A barrage of mortar shells collapsed a building occupied by U.S. soldiers and Iraqi National Guardsmen Thursday in Samarra, 70 miles north of Baghdad, killing five Americans and injuring 20, a military spokesman said.

The attack followed two weeks of sporadic shelling and gunfire in the Sunni Muslim town, according to the spokesman, Maj. Neal O'Brien. A resident of the city, who spoke on condition of anonymity, said "everyone was expecting the attack" after scores of arrests of suspected government opponents a week ago.

O'Brien said two Iraqi guardsmen were also killed and four were wounded. The names of the U.S. dead were withheld pending notification of relatives.

Soon after the attack, U.S. and Iraqi forces patrolling the town were fired on. They then surrounded a building into which four gunmen had fled. A U.S. helicopter launched Hellfire missiles at the building, killing all four men inside, O'Brien said.

"Certainly, the response has been quick and swift," O'Brien said by telephone. "The Iraqi National Guard and 1st Infantry Division soldiers immediately responded. We expect that to continue."

Samarra has long been a hostile zone for U.S. forces. Among its residents are members of two large tribes that remain largely loyal to deposed president Saddam Hussein and his Baath Party.

Another tribe in the city, the Albu Nisan, initially welcomed U.S. forces. But after some members got involved in weapons dealing and were killed by U.S. forces, the tribe turned against the occupation, said a local resident, who spoke on condition of anonymity.

O'Brien said Samarra had been the scene of a series of recent mortar and gunfire attacks. However, most of the mortar shells have fallen in empty areas and done little damage.

But at about 10:30 a.m. Thursday, a car bomb exploded near the base shared by Iraqi National Guard and U.S. soldiers. O'Brien said the blast was followed by a volley of 38 mortar shells, which destroyed the building.

Radar pinpointed the source of the attack, and U.S. forces responded with 120mm artillery fire. O'Brien said he did not know if any casualties resulted.

Also Thursday, Philippine President Gloria Macapagal Arroyo ordered Filipino contract workers to stop going to Iraq, following the broadcast of a videotape in Baghdad purporting to show a Filipino hostage being held by masked gunmen. The gunmen demanded that the Philippines withdraw its citizens from Iraq or the man would be killed.

The Philippines has 51 soldiers and police officers working with U.S. forces in Iraq. In addition, about 4,100 Philippine citizens work at U.S. military bases in Iraq, according to the Associated Press.

The broadcast, on al-Jazeera television, said the hostage worked for a Saudi company that holds a U.S. military contract. It did not name the man, but Philippine officials said he was Angelo dela Cruz, a truck driver apparently abducted near Fallujah.

[On Friday, the U.S. military announced that a U.S. soldier died from wounds suffered during an attack on a patrol in Baghdad on Thursday night, according to the Associated Press.]