BAGHDAD – Bombs ripped through apartment buildings and a market in mostly Shiite areas of Baghdad on Tuesday, killing 50 people. The postelection bloodshed threatens to rekindle sectarian warfare that nearly destroyed the country three years ago.

The attacks appeared to be an attempt by al-Qaida in Iraq or other extremists to exploit a power vacuum during what promises to be lengthy negotiations to form a new government. About 120 people have been killed in and around the capital during the past five days.

For two terrifying hours on a warm, sunny Tuesday morning, at least seven bombs rocked a broad swath of Baghdad. In a new tactic, several bombs were planted inside empty apartments after renters offered high prices for the properties, the government said.

With militants singling out entire families of both Muslim sects for slaughter, the recent violence is reminiscent of the far more widespread fighting that tore Iraq apart from 2005 to 2007 and prompted the United States to send tens of thousands of additional troops to the country.

U.S. officials sought to downplay the possibility that Iraq is sliding toward major sectarian fighting and insisted there were no plans to slow the withdrawal of American troops.

White House spokesman Robert Gibbs said that Gen. Ray Odierno, the top U.S. military official in Iraq, does not believe the violence threatens the ability of the U.S. military to draw down its forces this year.