* Militants bomb police post, raise ISIL flag over government buildings
* Police regain Sulaiman Pek, say three other villages under ISIL control
* Suicide bomb kills six at Anbar military base
* Car bombs kill three Tikrit policemen
By Suadad al-Salhy
BAGHDAD, Feb 22 (Reuters) - Sunni insurgents clashed with troops and briefly occupied a town in northern Iraq on Friday night, the latest development in an escalating turf war with the Shi'ite-led government that has killed at least 21 people in the past two days, police said.
Dozens of militants in SUVs drove into the small town of al-Sainiyah near Baiji, some 180 km (112 miles) north of Baghdad, after bombing the local police headquarters and fought troops for several hours overnight, witnesses said on Saturday.
At least four policemen and two Sunni government-backed militia members were killed in the fighting, officials said.
The militants raised the black flag of the Islamic State in Iraq and the Levant (ISIL) over government buildings in the town, recording their victory on video, before withdrawing on Saturday morning.
"The attack started at 7:30 pm (Friday) when we heard intense gunfire and successive mortar explosions near the police department. This situation lasted for around three hours," a resident called Yasser told Reuters by telephone.
He said the militants drove round the town all night, blasting religious anthems glorifying ISIL from their cars.
Police sources said the militants came from Anbar province, where the Iraqi army has been laying siege to the city of Falluja since early this year, when militants, among them ISIL took over.
Security officials say ISIL, which is also active in neighboring Syria and seeks to establish a Sunni state spanning the border into Iraq, wants to divert the security forces' attention away from Falluja and drain the Iraqi army's resources.
"It's a war of attrition and they are attempting to exhaust the capabilities of the army by dragging it into sporadic fighting here and there," a senior security official, who declined to be named, told Reuters.
"ISIL is still looking to find a suitable land to plant the seed of their Islamic emirate."
Sunni militants have been regaining ground in Iraq over the past year, but seizing territory marks an escalation in the conflict.
By Saturday, troops had re-gained control over most of Sulaiman Pek, another town in northern Iraq that was overrun last week by militants who also raised ISIL's banner, senior security officials said.
Three villages in the area surrounding Sulaiman Pek, 60 km north of Baghdad, remain under the control of militants, they said.
Separately, a suicide bomber driving a car packed with explosives blew himself up at the entrance to a military base in the east of the city of Ramadi in Anbar, killing at least six people on Saturday, security sources said.
In a village east of Baquba, 65 km northeast of Baghdad, five policemen were killed when gunmen opened fire at a checkpoint, police said.
A further three policemen were killed in three car bomb explosions on Saturday near the homes of police commanders in Tikrit, 150 km north of Baghdad, said police.
Police declared a curfew in the city and its suburbs in response, anticipating more attacks.
Last year was Iraq's bloodiest since sectarian violence began to abate in 2008.
Deteriorating security in northern and western Iraq has raised doubts that parliamentary elections can be held nationwide in April as scheduled. (Additional reporting by Ghazwan Hassan; Writing by Suadad al-Salhy; Editing by Isabel Coles and Sophie Hares)