Insurgent activity flared Thursday night and Friday in western Iraq, as Iraqi soldiers found at least 17 bodies near the border town of Qaim, and residents of nearby Husaybah reported that guerrillas loyal to the leader of the group called al Qaeda in Iraq had taken control of the town.

The U.S. military, meanwhile, reported that five Marines were killed Thursday in the western town of Haqlaniyah, 125 miles northwest of Baghdad, when their vehicle struck an explosive device. No other details were released.

[And the Reuters news agency reported that, according to police and hospital officials, a car bomb exploded in a Shiite area of Baghdad early Saturday, killing 10 people and wounding 27.]

Qaim and Husaybah, neighboring towns situated where the Euphrates River crosses the Syrian border 210 miles northwest of the capital, have been racked by violence several times in recent months. Insurgents briefly staged a coordinated, sustained assault on a U.S. Marine base at Qaim in mid-April. Husaybah has been the scene of frequent skirmishing between local tribes and foreign guerrillas.

The bodies found outside Qaim were discovered in two locations, according to Hamdi Muhammed, a physician at Qaim's hospital. Soldiers uncovered 11 bodies about six miles north of Qaim on Thursday night and found six more early Friday about four miles south of town, he said.

Two of the bodies were headless, and the rest had been shot several times, Muhammed said. All were in civilian clothes, and none carried identification or other documents, he said.

Emad Muhammed, 32, a resident of Qaim, said al Qaeda in Iraq distributed a statement in a local mosque that asserted responsibility for the killings, listed the names of the 17 men and called them "spies for the U.S. forces."

The Associated Press reported later Friday that 21 bodies had been found.

Al Qaeda in Iraq, which is led by Abu Musab Zarqawi, a Jordanian, and has asserted involvement in many of the grisliest killings in Iraq in the past two years, said Wednesday that it had kidnapped 22 Iraqi soldiers. Iraq's Defense Ministry denied the claim, but the group repeated it Friday, raised the number of captives to 36 and demanded that all Muslim women be released from Iraqi jails.

The Associated Press on Friday quoted an Iraqi army officer in Qaim who said the soldiers had disappeared Tuesday after leaving an Iraqi army base near the Syrian border about 70 miles southwest of Qaim. Capt. Ahmed Hamid said the soldiers were wearing civilian clothes and traveling to Baghdad for a vacation.

In Husaybah, armed insurgents swept through the town on Thursday night, according to residents who fled. Witnesses said the insurgents, whom they identified as members of al Qaeda in Iraq, abducted Iraqi soldiers, truck drivers and others, and were holding them hostage in abandoned houses.

One witness, who refused to be identified by name, said the insurgents raised the flag of al Qaeda in Iraq over key buildings, including mosques and government offices.

Arkan Salim, 56, a resident of Husaybah who fled with his wife and four children, said the goodwill that many townspeople felt toward the insurgent group had been shattered.

"We thought the fighters were supermen because they fought the occupation. We thought they were patriotic," Salim said. "Now we discovered that they are sick and crazy. They are not Muslims. They interfered in everything, even how we raise our children. They turned the city into hell, and we cannot live in it anymore."

In the northern city of Kirkuk, where ethnic tensions among Arabs, Kurds and Turkmen are high, the two top officers in the counter-terrorism and anti-corruption unit of the local police were gunned down Thursday night.

In the southern city of Basra, gunmen killed a commander in the police academy, Col. Abdul Karim Darraji, and his brother, according to Ali Hussin Hummadi, a witness.

The AP also reported the deaths of four Iraqis in a car bombing outside a restaurant in Baghdad.

Also in the capital, the U.S. military said it had opened a criminal investigation into the deaths of two soldiers killed June 7 at Forward Operating Base Danger, near Tikrit. Capt. Phillip T. Esposito and 1st Lt. Louis E. Allen of the New York National Guard were killed in what was initially thought to be a mortar attack, the military said in a statement. But an investigation by explosives specialists determined that the blast pattern was inconsistent with a mortar shell, and the case was handed over to the military's Criminal Investigation Division.

Special correspondents Marwan Ani in Kirkuk and Emad Zainal in Basra contributed to this report.

Iraqi troops discovered bodies in a gravel pit outside the town of Qaim. More were found at a second location.