(Add claim of responsibility from Islamic State)

BAGHDAD, Oct 5 (Reuters) - At least 57 people were killed on Monday in car bomb attacks in Baghdad and the north and south of Iraq, police and medical sources said.

One attack took place near a crowded market in the town of Khalis, about 80 km (50 miles) northeast of Baghdad, killing 35 people, police said.

"The driver begged police to be allowed to park his vehicle in order to buy medication from a nearby pharmacy and five minutes later it (the bomb) went off and caused huge destruction," police captain Mohammed al-Tamimi said.

In the town of Al Zubair, about 15 km (9 miles) southwest of the oil town of Basra, a second attack took place also near a crowded market. Ten people died.

Another car bomb exploded in the Hussainiya district of the northern outskirts of Baghdad, killing 12 people, police and medical sources said.

Islamic State, the ultra-hardline Sunni group that controls a third of the country and wants to redraw the map of the Middle East, claimed responsibility for the car bomb attack in Al Zubair through an affiliated Twitter account.

Iraq, a major OPEC oil producer, is struggling to come up with a formula to contain Islamic State.

(Reporting by Ahmed Rasheed and Saif Hameed; Writing by Michael Georgy and Babak Dehghanpisheh; Editing by Alison Williams) ((michael.georgy@thomsonreuters.com;)(M)(+2010 271 00098)(O)(+20 225783290; Reuters Messaging: michael.georgy.thomsonreuters.com@reuters.net))

Keywords: MIDEAST CRISIS/IRAQ VIOLENCE