FALLUJAH, Iraq — U.S. Marines in the third day of a battle to pacify this Sunni Muslim city fired a rocket and dropped a 500-pound, laser-guided bomb on a mosque compound Wednesday, and witnesses said as many as 40 people were killed. Shiite-inspired violence spread to key cities in Iraq.

The fighting in Fallujah and neighboring Ramadi — just east of Baghdad — has killed 15 Marines since Monday and was part of an intensified uprising involving other Sunni towns in northern and central Iraq, and Shiite population centers south of the capital.

Marines waged a six-hour battle around the Abdul-Aziz al-Samarrai mosque with militants holed up inside before a Cobra helicopter fired a Hellfire missile at the base of its minaret and an F-16 dropped the bomb, said Marine Lt. Col. Brennan Byrne.

The fight began when a Marine vehicle was hit by a rocket-propelled grenade fired from the mosque, wounding five Marines, and a large U.S. force converged on it, Byrne said.

Witnesses said the strike came as worshippers had gathered for afternoon prayers.

An Associated Press reporter saw cars ferrying out dead and wounded. Witnesses said part of a wall surrounding the mosque compound was destroyed but the main building was not damaged.

In Baghdad, Brig. Gen. Mark Kimmitt told CNN that from photos of the mosque he had seen, "the actual mosque structure itself" was not damaged.

Its minaret was damaged, but still standing, an AP reporter said.

"It is a holy place, there is no doubt about it," Kimmitt added. "It has a special status under the Geneva Convention that it can't be attacked.

"However, it can be attacked when there is a military necessity brought on by the fact that the enemy is storing weapons, using weapons, inciting violence and executing violence from its grounds," he said.

Because casualties were rushed to makeshift clinics in private homes and mosques, the number of dead and wounded was unclear.

During fighting elsewhere in Fallujah, U.S. forces seized another mosque, the al-Muadidi mosque, and a Marine climbed its minaret and fired down on gunmen, witnesses said. Insurgents hit the minaret with rocket-propelled grenades, causing it to partly collapse, the AP reporter said.

Insurgents also blew up two highway overpasses into the city to prevent U.S. troops from using them. A helicopter rocketed three houses, and the reporter saw at least five wounded people, including a young boy, being pulled out of one them.

Byrne said the Marines controlled about a quarter of Fallujah.

Defense Secretary Donald H. Rumsfeld said U.S. forces launched the operation in Fallujah to capture insurgents involved in attacks on Americans, including the ones who mutilated and burned the bodies of four U.S. civilians ambushed last week. He said the troops had pictures and names of those involved and were not attacking the town as a whole.

But militants, who have wide popular support, dug in and fiercely resisted the U.S. raids into the city center and attacked American troops encircling the city of 200,000. The intensity of the resistance apparently prompted U.S. forces to bring in heavy weapons such as helicopters, tanks and AC130 gunships that have pounded suspected militant sites in the densely populated neighborhoods.

Since Sunday, 34 Americans, two other coalition soldiers and more than 190 Iraqis had been killed in fighting across the country. The Iraqi figure did not include those killed at the mosque.

Kimmitt vowed to "destroy" the militia of radical Shiite cleric Muqtada al-Sadr, which has been behind the wave of attacks and street fighting with coalition troops in southern cities and Baghdad this week.

Al-Sadr said Iraq will become "another Vietnam" for the United States unless it transfers power to Iraqis who are not connected with the U.S.-led occupation authority.

"I call upon the American people to stand beside their brethren, the Iraqi people, who are suffering an injustice by your rulers and the occupying army, to help them in the transfer of power to honest Iraqis," al-Sadr said in a statement from his office in the southern city of Najaf. "Otherwise, Iraq will be another Vietnam for America and the occupiers."

Al-Sadr's al-Mahdi Army launched heavy gunbattles with coalition forces in the streets of three southern cities Wednesday and, for the first time, in the north. Al-Sadr fighters battled American troops in the town of Baqouba, northeast of Baghdad, hitting a U.S. helicopter with small arms fire. The OH-58 Kiowa chopper was damaged and forced to land, but the two crewmembers were unharmed.

And Shiite gunmen drove Ukrainian forces out of the southern city of Kut — raising concerns over the ability of U.S. allies to control al-Sadr's uprising.

After gunbattles overnight killed 12 Iraqis, the Ukrainians withdrew from Kut, and al-Sadr followers swept into their base, seized weapons stores and planted their flag on a nearby grain silo.

The black-garbed gunmen of the al-Mahdi Army also had virtual control of Kufa and Karbala, where Iraqi police lay low, allowing militiamen to move freely and acting only to prevent looting. Militiamen in Karbala clashed with Polish patrols that moved through their areas, and a cleric who was a senior official in al-Sadr's office in the city was killed.

Al-Sadr and his militia are unpopular among most of Iraq's Shiite majority, and there was no sign that the Shiite public in the south was rallying to their side to launch a wider popular uprising.

But the week's fighting showed a strength that few expected from the al-Mahdi Army, and moderate Shiite clerics and leaders have not raised their voices strongly against the uprising.

There were signs of sympathy for the Sadr revolt by Sunni insurgents, who have been fighting the U.S.-led occupation for months and have often chided their Shiite countrymen for not joining in.

Portraits of al-Sadr and graffiti praising his "valiant uprising" appeared on mosque and government building walls in the Sunni city of Ramadi. Peaceful protests in support of al-Sadr occurred in the northern cities of Mosul and Rashad.

Monday night in Baghdad, al-Sadr gunmen went to a mainly Sunni neighborhood to join with insurgents there in firing on U.S. Humvees — the only known instance so far of Sunni and Shiite militants joining forces.

The military also announced the deaths of two U.S. soldiers — one killed in the Sunni Triangle city of Balad, north of Baghdad, on Tuesday, the other on Wednesday in an RPG attack on his convoy in the capital.

Anger was also spreading over the three-day U.S. siege of Fallujah, one of the Sunni insurgents' strongest bastions, west of Baghdad. Iraqis protesting the operation clashed with U.S. troops outside the northern city of Kirkuk in fighting that left eight Iraqis dead and 10 wounded.

The 12 Marines were killed Tuesday in Ramadi, where Maj. Gen. James Mattis, 1st Marine Division commander, said his forces still were fighting insurgents that included Syrian mercenaries along a one-mile front.

In Fallujah, dozens of insurgents carrying RPGs and automatic weapons, their faces wrapped in scarves, dug in around an eastern entrance to the city, setting up sandbags. Three Marines have been killed there since Monday, the U.S. military said Wednesday.

Mosque loudspeakers blared calls for jihad, or holy war, and women were seen carrying guns in the streets.

Sixteen children and eight women were reported killed when warplanes struck four houses late Tuesday, said Hatem Samir, a Fallujah Hospital official.

On Tuesday, insurgents opened a new front with the bloody attack in Ramadi. Gunmen hiding in Ramadi's main cemetery opened fire on U.S. patrols, sparking a gunbattle, witnesses said, adding that at least two Iraqis were killed.

Kimmitt called for the surrender of al-Sadr, who is named in an arrest warrant for involvement in the murder of a rival Shiite cleric almost a year ago.

There was no sign, however, that al-Sadr's forces had eased their attacks:

Militiamen battled Spanish soldiers in Najaf, and a taxi driver was killed in the crossfire, a hospital official said.

Clashes erupted overnight in Baghdad's Sadr City, killing four Iraqis and wounding seven others, doctors said.

Militiamen traded fire with Polish troops in Karbala overnight, killing two Iranian tourists, witnesses said.

Gunmen attacked a police car Tuesday night in Youssifiya, south of Baghdad, killing two policemen.

With confirmation of the latest deaths, the American death toll since the war was at least 630.