BAGHDAD — The Iraqi military tried to dislodge al-Qaida militants in Sunni-dominated Anbar province Sunday, unleashing airstrikes and besieging the regional capital in fighting that killed at least 34 people, officials said.

A series of bombs in Shiite neighborhoods of Baghdad, meanwhile, killed at least 20 people.

The recent gains by the insurgents have been a blow to the Shiite-led government, as sectarian violence has escalated since the U.S. withdrawal.

Video of the airstrikes in Anbar was released by Iraq’s Defense Ministry showing al-Qaida hideouts being bombarded. It showed men gathered around a vehicle, then running away as the site was struck.

A ministry statement said the air force struck a militants’ hideout overnight, identifying them as belonging to the al-Qaida-linked Islamic State in Iraq and the Levant, which the government refers to as “terrorists.”

The army and allied tribesmen also fought al-Qaida militants around the provincial capital of Ramadi on Sunday, two Anbar government officials said. They said 22 soldiers and 12 civilians were killed, along with an unknown number of militants, and 58 people were wounded.

Clans inside the city of Fallujah have started to form brigades, they said, and some of the factions who fought the Americans following the U.S.-led invasion a decade ago say they do not want the Iraqi army to enter the city. There was no fighting inside the city Sunday.

Government troops, backed by Sunni tribesmen who oppose al-Qaida, have encircled Fallujah for several days, and have entered parts of Ramadi. On Friday, troops bombarded militant positions outside Fallujah with artillery, a military official said.

The deadliest attack Sunday in Baghdad took place in the northern Shiite Shaab neighborhood, where two car bombs exploded simultaneously near a restaurant and a tea house. Officials say those blasts killed 10 people and wounded 26.

Authorities said a car bomb ripped through the capital’s eastern Shiite district of Sadr City, killing five and wounding 10. Another bombing killed three civilians and wounded six in a commercial area in the central Bab al-Muadham neighborhood, officials said.

Two other bombings killed two civilians and wounded 13, police said. Medical officials confirmed the figures.

Clashes have been taking place since last Monday in Ramadi and nearby Fallujah, and the Baghdad bombings could be seen as an attempt by militants to distract security forces.

Earlier Sunday, a senior Iraqi military commander said that it will take a few days to fully dislodge al-Qaida-linked fighters in the two cities.

Lt. Gen. Rasheed Fleih, who leads the Anbar Military Command, told state TV Sunday that “two to three days” are needed to push the militants out of Fallujah and parts of Ramadi. Fleih added that pro-government Sunni tribes are leading the operations while the army only is offering aerial cover and logistics on the ground.

Ramadi was a stronghold of Sunni insurgents during the U.S. war. Al-Qaida militants largely took over both cities last week and have been fending off incursions by government forces since.

ISIL is also one of the strongest rebel units in neighboring Syria, where it has imposed a strict version of Islamic law in territories it holds in the civil war raging there. It also has kidnapped and killed dozens of people it deems critical of its rule.