BAGHDAD — Two bombings claimed by the Islamic State killed at least 25 people in central Baghdad on Saturday as fighting intensified in the northern city of Mosul, where government forces are trying to rout the jihadists from that city, their last major stronghold in the country.

The blasts, including one suicide attack, tore through a busy market in the Sinak neighborhood, the police said. A pro-Islamic State news agency said the assailants had targeted Shiite Muslims, whom they regard as apostates.

The Islamic State has continued to launch attacks in Baghdad, the heavily fortified capital, even after losing most of the northern and western territory it seized in 2014.

The recapture of Mosul would probably spell the end for the Islamic State’s self-declared caliphate, but the militants would still be capable of fighting a guerrilla-style insurgency in Iraq and plotting or inspiring attacks on the West.