* Militants take hostages in police HQ
* Unrest spreads in Sunni Muslim areas
* Syrian civil war deepens ethnic and religious faultlines (Adds Maliki speech, local vote result, security incidents)
By Suadad al-Salhy
BAGHDAD, April 25 (Reuters) - Nearly 50 people were killed in clashes on Thursday in the northern Iraqi city of Mosul, sources said, on the third day of the most widespread violence in Iraq since U.S. troops withdrew in December 2011.
More than 100 people have been killed in fighting since Tuesday, when troops stormed a Sunni protest camp, triggering clashes that quickly spread to other Sunni areas in western and northern provinces.
Thousands of Sunni Muslims have taken to the streets since December in protest at the perceived marginalisation of their sect since the U.S.-led invasion overthrew Saddam Hussein and empowered majority Shi'ites through the ballot box.
Shi'ite Prime Minister Nuri al-Maliki's coalition took the lead in eight of the 12 provinces that held provincial elections at the weekend, including the capital Baghdad, preliminary results showed on Thursday.
The strong showing by Maliki's State of Law alliance - based on 87 percent of the results - consolidates his position ahead of parliamentary elections due in 2014, when he has hinted it will be time to form a majority government.
Iraqi politics are deeply split along sectarian lines, with Maliki's government deadlocked over how to share power among Shi'ites, Sunni Muslims and ethnic Kurds, who run their own autonomous region in the north.
The delicate ethno-sectarian balance has come under growing strain from the civil war in neighbouring Syria, where mainly Sunni Muslim rebels are fighting to overthrow a leader backed by Shi'ite Iran.
Violence, including bomb attacks that have killed dozens of people at a time, has increased across Iraq this year. Provisional figures from rights group Iraq Body Count indicate about 1,365 people have been killed so far in 2013.
Gunmen attacked Mosul, 390 km (240 miles) north of Baghdad, on Wednesday night and took control of western parts of the city after using a mosque loudspeaker to rally Sunnis to join the battle.
Military sources said federal police and the army regained control after surrounding a police headquarters occupied by militants, who were holding 17 hostages. The federal police chief said 31 militants had been killed in the fighting.
A source at a local morgue said it had received the bodies of nine militants and 15 policemen but others had yet to be recovered.
Insurgents also seized the town of Sulaiman Pek, 160 km (100 miles) north of Baghdad, overnight on Wednesday. Troops and tanks surrounded the town and gave the militants 48 hours to lay down their arms and leave, threatening to attack them otherwise.
The highway between Kirkuk and Baghdad was closed.
In a televised speech, Maliki warned Iraq was in great danger, calling on clerics and tribal leaders to rein in those who sought to plunge the country back into strife.
Clashes erupted in Falluja, 50 km (30 miles) west of Baghdad, after militants attacked a federal police headquarters. The number of casualties was not known.
A bomb exploded in a parked car in central Najaf, killing three people, police said.
Sectarian bloodshed reached its height in Iraq in 2006-2007, three years into the U.S. occupation, after al Qaeda bombed the Shi'ite Askari shrine in Samarra, triggering a cycle of retaliation. (Additional reporting by Sufyan al-Mashhadani in Mosul and Raheem Salman in Baghdad; Writing by Isabel Coles; Editing by Andrew Roche)