A wave of bombings hit the Iraqi capital Sunday, killing at least 21 people in a spate of violence that rocked nearly every corner of Baghdad and renewed questions about whether the country’s security forces can repel future internal threats.

In a 90-minute period starting shortly after sunrise, more than a dozen explosions ripped through the city, unnerving ordinary Iraqis as well as officials from the United States and Iraq who had been heralding the overall decline in violence here in recent months.

With the 46,000 U.S. troops still in Iraq preparing to withdraw by the end of the year, the sheer number of attacks Sunday raised further concerns about what awaits Baghdad.

Gen. Jeffrey S. Buchanan, chief spokesman for the U.S. military in Iraq, said the violence “serves as a solemn reminder that there remains a determined and dangerous enemy.”

Neither Buchanan nor Iraqi security officials would speculate about who may have been behind Sunday’s attacks. But several Baghdad officials said they fear the city is facing dual threats in the months leading up to the scheduled Dec. 31 withdrawal of U.S. forces.

Mohammeed Alrubaye, a member of the Baghdad Provincial Council, said he fears that the violence is being fueled simultaneously by groups such as al-Qaeda and by other interests hoping to destabilize the Iraqi government to force a continued U.S. presence. “It’s kind of a two-shot situation,” he said.

Most of the explosions were directed at Iraqi police officers and government officials, who have become targets of terrorism in recent months.

Security officials estimate that at least 21 people were killed and more than 80 injured during a succession of attacks that came from 8 a.m. to 9:30 a.m.

In addition, on Sunday afternoon, two U.S. soldiers were killed and three others wounded when a bomb detonated in western Baghdad near a U.S. military convoy, according to an Iraqi security official. In a statement, the U.S. military confirmed the deaths of two soldiers Sunday in central Iraq but said it is withholding details about the incident pending notification of next of kin.

The most serious incident of the morning occurred in Baghdad’s Taji district in the northern part of the city after a booby-trapped car exploded near a convoy. After Iraqi police rushed to the scene, a man wearing an explosives-laden vest blew himself up, killing at least 12 and injuring dozens, according to security officials.

Near-simultaneous explosions were also reported in Ala’amil district in the southern part of the city, near federal police headquarters, and on Palestine Street in eastern Baghdad, where an explosive charge went off near a group of police officers, killing one officer and injuring five civilians, officials said.

In Sadr City in eastern Baghdad, a bomb detonated near the area’s main hospital, killing at least two people and injuring five, according to an Interior Ministry spokesman. A separate explosion nearby wounded five others, according to government officials.

Then, in Talibia in northern Baghdad, a car bomb exploded near a convoy carrying Adil Muhammad, described as the head of internal affairs for the Interior Ministry. Muhammad survived, but one person was killed and five others were injured, including two bodyguards.

In Baghdad’s central business district, one person was killed and a dozen police officers were wounded in an apparent bombing, officials said.

Iraqi Prime Minister Nouri al-Maliki did not directly address the violence Sunday, but the attacks will probably increase the pressure on the government to prove it can control the recent uptick in bloodshed.

Tariq al-Hashimi, Iraq’s vice president, said the government needs to take “immediate and fast” steps to beef up security in the capital, including the appointment of national security ministers.

Although Iraq’s coalition government was formed last year, the country is still operating without interior and defense ministers, and a director of intelligence. Maliki has been saying for weeks that the appointments are forthcoming, but his nominations have been caught up in infighting among political blocs in Parliament.

On Thursday, a bomb ripped through a garage at police headquarters in Kirkuk, killing at least 27 police officers, firefighters and security personnel and injuring 86 others in what Iraqi media described as the deadliest incident in the country in more than two months.

Some Iraqi government officials have blamed al-Qaeda for the Kirkuk attack, noting that it came one day after they arrested several men in the area suspected of having ties to the group.

Special correspondents Aziz Alwan and Asaad Majeed contributed to this report.