(Adds details, changes dateline)
By Isabel Coles
ARBIL, Iraq, Aug 7 (Reuters) - Islamic State militants extended their gains in northern Iraq on Thursday, seizing more towns and strengthening a foothold near the Kurdish region, witnesses said, in an offensive that has alarmed the Baghdad government and regional powers.
The advance came after the Sunni militants inflicted a humiliating defeat on Kurdish forces in a weekend sweep in the north.
The Islamic State, which has declared a caliphate in parts of Iraq and Syria it controls, clashed with Kurdish forces on Wednesday in the town of Makhmur near Arbil, the capital of the Kurdish autonomous zone.
Witnesses said the militants had seized Makhmur, but Kurdish officials told local media their forces remained in control there and television channels broadcast footage of peshmerga fighters driving around the town.
The mainly Christian town of Tilkaif, as well as Al Kwair, were overrun by militants, according to witnesses, and residents of Iraq's biggest Christian town, Qaraqosh, fled before the arrival of the Islamist fighters.
The Islamic State poses the biggest threat to Iraq's integrity since the fall of Saddam Hussein in 2003. Its fighters and their Sunni allies also control a big chunk of western Iraq.
The group has deepened sectarian tensions, pushing the country back to the dark days of a civil war which peaked in 2006-2007 under U.S.-led occupation.
Bombings, kidnappings and executions are routine once again in Iraq, an OPEC member. Religious and ethnic minorities that have lived in the plains of the northern province of Nineveh are particularly vulnerable.
Sunni militants have been purging Shi'ite Muslims of the Shabak and ethnic Turkmen minorities from towns and villages in Nineveh, and last month set a deadline for Christians to leave the provincial capital Mosul or be killed.
The death toll from car bombings in crowded markets in Shi'ite areas of Baghdad climbed overnight to 59, with 125 wounded, security and medical sources said.
The Islamic State's gains have prompted Iraqi Prime Minister Nuri al-Maliki, a Shi'ite, to order his air force to help the Kurds, whose reputation as fearsome warriors was called into question by their defeat.
There were several air force strikes on Wednesday, including one the government said killed 60 "terrorists" in Mosul, but they did not appear to have broken the Islamic State's momentum.
The militants' capture of the town of Sinjar, ancestral home of the Yazidi ethnic minority, prompted tens of thousands of people to flee to surrounding mountains, where they are at risk of starvation.
The Islamic State sees the Yazidis, followers of an ancient religion derived from Zoroastrianism, as "devil worshippers". They are spread across a large area of northern Iraq and are part of the country's Kurdish minority.
Many of their villages were destroyed when Saddam Hussein's troops tried to crush the Kurds. Some were taken away by the executed former dictator's intelligence agents.
Now they are on the defensive again. (Writing by Michael Georgy; Editing by Paul Taylor)