In a separate incident 12 miles to the northwest, five 1st Infantry Division soldiers died when their M-113 armored personnel carrier ran over a bomb among the reed-lined roads running through some of Iraq's richest farmland.
It was one of the bloodiest days for the U.S. military this year, and brought to at least 591 the number of Americans killed in Iraq.
The four contract workers for the U.S.-led coalition were killed in a rebel ambush of their SUVs in Fallujah, a Sunni Triangle city about 35 miles west of Baghdad and scene of some of the worst violence on both sides of the conflict since the beginning of the American occupation a year ago.
According to a State Department official, the four included three Americans. Contrary to earlier reports, all four were men, the official said.
Associated Press Television News pictures showed one man beating a charred corpse with a metal pole. Others tied a yellow rope to a body, hooked it to a car and dragged it down the main street of town. Two blackened and mangled corpses were hung from a green iron bridge across the Euphrates.
Beneath the bodies, a man held a printed sign with a skull and crossbones and the phrase "Fallujah is the cemetery for Americans."
In other developments:
White House Press Secretary Scott McClellan says the administration mourns Wednesday's loss of life, but intends to "stay the course" in Iraq.
McClellan rejected comparisons to a gruesome 1993 attack in Somalia, where a mob dragged the corpse of a U.S. soldier through the streets of the capital. The U.S. pulled out soon after.
McClellan vowed that will not happen in Iraq.
"Freedom is on its way. There is no turning back," he said.
On the scene in Fallujah, APTN showed the charred remains of three slain men. Some were wearing flak jackets, said resident Safa Mohammedi.
Chanting "Fallujah is the graveyard of Americans," residents cheered after the grisly assault on two four-wheel-drive civilian vehicles, which left both in flames. Others chanted, "We sacrifice our blood and souls for Islam."
"The people of Fallujah hanged some of the bodies on the old bridge like slaughtered sheep," resident Abdul Aziz Mohammed said. Some of the corpses were dismembered, he said.
Witnesses said the two vehicles were attacked with small arms fire and rocket propelled grenades.
What looked like military identification tags and an American passport were found in the wreckage, CBS News Correspondent Kimberly Dozier reported. But the victims were wearing civilian clothes and bulletproof vests commonly used by foreign contractors, the media and the military.
In Baghdad, Brig. Gen. Mark Kimmitt said the four killed in Fallujah were contractors working with the coalition. He did not say what they were doing in the city.
U.S. military officials in Washington said the situation was still confused but they did not think the victims were American soldiers and believed the SUVs were not American military vehicles.
Hours after the attack, the city was quiet. No U.S. troops or Iraqi police were seen in the area.
Fallujah is in the so-called Sunni Triangle, where support for Saddam Hussein was strong and rebels often carry out attacks against American forces.
The latest violence came two days after Carina Perelli, the head of a U.N. electoral team, said better security is vital if Iraq wants to hold elections by a Jan. 31 deadline. The polls are scheduled to follow a June 30 transfer of sovereignty to an Iraqi government.
U.S. commanders had predicted an upsurge in violence as the June 30 deadline approaches, and the killings of soldiers and contractors were just two of the incidents over a 24-hour period.
In Ramadi, insurgents threw a grenade at a government building and Iraqi security forces returned fire Wednesday, witnesses said. It was not clear if there were casualties. Also in Ramadi, a roadside bomb exploded near a U.S. convoy, witnesses said. U.S. officials in Baghdad could not confirm the attack.
Northeast of Baghdad, in the city of Baqouba on Wednesday, a suicide bomber blew up explosives in his car when he was near a convoy of government vehicles, wounding 14 Iraqis and killing himself, officials said.
The attacked convoy is normally used to transport the Diala provincial governor, Abdullah al-Joubori, but he was elsewhere at the time, said police Col. Ali Hossein.
A bomb exploded late Tuesday in a movie theater that had closed for the night. Two bystanders were wounded by flying glass, said its owner, Ghani Mohammed.