BAGHDAD — A string of car bombs tore through busy shopping streets in several Baghdad neighborhoods Wednesday night and killed 51 people as the army announced that one of its airstrikes had killed 60 militants in the northern city of Mosul.

Baghdad police said the first attack was a pair of car bombs that exploded in the densely populated Shiite neighborhood of Sadr City, killing 31 people, followed by another bomb in the nearby area of Ur that claimed another 11 lives.

Nine more people were killed in the city’s southeast shortly afterward by two more car bombs.

Baghdad has been on edge since Sunni militants led by the radical Islamic State group conquered large swaths of the country’s north, including the second largest city of Mosul. While the fighters have stopped short of advancing on the capital there has been a steady campaign of car bombs in the city, though none this deadly.

The attack came as state-run television announced a rare government victory with an airstrike against a key building in Mosul that killed some 60 suspected militants earlier in the day.

The report, which cited unnamed intelligence officials, could not be independently verified, nor did it say whether any civilians had been killed in the strike.

The report said the strike freed about 300 people held by the Islamic State group at a downtown Mosul prison it had been using as a religious court and detention center, without elaborating.

The onslaught by the Islamic State backed by local Sunni militants has plunged Iraq into its worst crisis since the withdrawal of U.S. troops in 2011.

The group since has imposed a self-styled caliphate in territory it controls in Iraq and Syria, imposing its own harsh interpretation of Islamic law.

Iraqi government forces and allied Sunni tribal militiamen have been struggling to dislodge the militants with little progress.

Also Wednesday, police found eight bullet-riddled and handcuffed corpses near Baghdad.