BAGHDAD | A tractor-trailer loaded with Shi’ite militia rockets accidentally exploded Wednesday in a densely populated area of northeast Baghdad, killing 18 people and wounding 75, the U.S. military said. It was the deadliest explosion in Baghdad in more than two months.

Iraqi police said the blast was a suicide truck bomb that struck near the home of an Iraqi police general, killing his nephew and wounding his elderly parents.

But the U.S. military said Shi’ite extremists were positioning a large truck loaded with rockets and mortars, aiming the weapons at a U.S. combat outpost 700 yards away, when it accidentally exploded.

“They were trying to attack us at that [forward operating base], and it went off [accidentally]. They wouldn’t waste rockets like that,” said Lt. Col. Steve Stover, a U.S. military spokesman.

Col. Stover said the militants responsible for the truck had likely fled recent fighting in Sadr City.

The explosion crumbled several two-story buildings, buried cars under rubble and sheared off a corrugated steel roof.

In a separate incident, Iraqi police and hospital officials said a car bomb killed seven people near an ice cream shop in eastern Baghdad. Another 11 people were wounded, and three policemen were among the dead.

Also Wednesday, three U.S. soldiers were shot dead in northern Iraq, and the decaying bodies of at least 23 Iraqis were discovered in a shallow grave and a sewer shaft at separate sites near Baghdad.

The Americans were killed when gunmen opened fire on them in the northern Iraqi village of Hawija, according to a brief military statement.

The area, once a hub for Sunni militants and disaffected allies of Saddam Hussein, is thought to have been pacified in recent months. Last year, it hosted one of the largest sign-on ceremonies for tribal sheiks partnering with U.S. forces to fight al Qaeda in Iraq.

The latest U.S. deaths brought to at least 4,090 the number of U.S. military personnel who have died in the Iraq war since it began in March 2003, according to an Associated Press count.

South of Baghdad, Iraqi villagers and soldiers unearthed at least 13 bodies from a shallow, dusty grave in farmland on the outskirts of Latifiyah, a mostly Sunni town that also has some Shi’ite residents.