BAGHDAD — Iraqi government forces and allied tribal militias launched an all-out offensive Sunday to push al-Qaida militants from a provincial capital, an assault that killed or wounded some 20 police officers and government-allied tribesmen, officials said.
Since late December, members of Iraq’s al-Qaida branch — known as the Islamic State of Iraq and the Levant — have taken over parts of Ramadi, the capital of the largely Sunni western province of Anbar. They also control the center of the nearby city of Fallujah, along with other non-al-Qaida groups that also oppose the Shiite-led government.
A military officer and two local officials said fierce clashes raged through Sunday night in parts of Ramadi, but gave no details.
The two Anbar officials said 20 police officers and allied tribesmen were either killed or wounded during the assault. The officials were unable to provide a breakdown of the casualties.
Abu Bakr al-Baghdadi, who heads the al-Qaida group in Iraq, urged Iraqi Sunni to join the militants in an audio message posted on militant websites Sunday.
‘‘You the Sunnis people in Iraq, you can carry the weapons against the Shiites. ... This is your chance, so do not miss it. Otherwise you will be finished,’’ al-Baghdadi said. He also exhorted his militants to continue their fight and also attack Baghdad.
Hours after the offensive was announced, Iraq’s Prime Minister Nouri al-Maliki vowed to continue fighting ‘‘terrorism,’’ but left the door open for a political solution.
‘‘Our battle is firstly to beat and eliminate terrorism, though we welcome any solution, any proposal and any political meeting that should realize the priority of destroying terrorism, al-Qaida, its formations and its allies,’’ al-Maliki said.
Elsewhere Sunday, gunmen opened fire on a checkpoint run by an anti-al-Qaida, pro-government Sunni tribal militia outside the city of Baqouba, killing the local leader and four assistants, a police officer and medical officials said. The former al-Qaida stronghold Baqouba is located about 60 kilometers (35 miles) northeast of the capital, Baghdad.
The Sunni militia, known as the Awakening Council, was formed by U.S. forces during the height of the insurgency. They are seen as traitors by al-Qaida’s local branch and other militant groups.
The officials in Anbar province and Baqouba spoke on condition of anonymity as they were not authorized to release information.
Violence has escalated in Iraq over the past year, particularly since late last month after authorities dismantled an anti-government Sunni protest camp and arrested a Sunni lawmaker on terrorism charges. To alleviate the tension, the army pulled back from Fallujah and Ramadi, but that allowed al-Qaida militants to seize control.
Last year, the country saw its highest annual death toll since the worst of the country’s sectarian bloodletting began to subside in 2007, according to United Nations figures. The U.N. said violence killed 8,868 in 2013. Sunday’s violence brought the death toll so far this month to 364, according to an Associated Press tally.
Associated Press writers Qassim Abdul-Zahra and Sameer N. Yacoub contributed to this report.