An Afghan security man carries RPGs following a gun battle between militants and Afghan security forces on the outskirts of Kabul. Afghan forces killed five insurgents who were planning to attack Kabul in an early morning gun battle Thursday just outside of the capital, officials said. (ASSOCIATED PRESS / Musadeq Sadeq)

KABUL, Afghanistan (AP) — An Afghan police officer shot and killed three U.S. Marines after sharing a meal with them before dawn Friday and then fled into the desolate darkness of southern Afghanistan, the third attack on coalition forces by their Afghan counterparts in a week.

Four other international troops also died Friday, bringing to seven the number killed on the day in the violent south, where insurgents have their strongest roots. Three died in an attack, which is under investigation, and the fourth was killed in a separate attack, NATO said.

Thirty-one coalition service members have now died this year at the hands of Afghan forces or insurgents disguised in Afghan uniforms, according to NATO — a dramatic rise from previous years.

The assaults have cast a shadow of fear and mistrust over U.S. efforts to train Afghan soldiers and police more than 10 years after the U.S.-led invasion to topple the Taliban's hardline Islamist regime for sheltering al-Qaida's leadership. The attacks also raise further doubts about the quality of the Afghan forces taking over in many areas before most international troops leave the country in 2014.

The three Marines were killed in the volatile Sangin district of Helmand province, said U.S. military spokeswoman Maj. Lori Hodge. Sangin was a Taliban stronghold for years and has one of the highest concentrations of improvised explosive devices, or IEDs, in the country.

A U.S. Defense Department official confirmed that the dead Americans were Marine Special Operations Forces. He spoke on condition of anonymity because the family notification process was not complete.

Sangin's district chief and the Taliban both identified the gunman as Asadullah, a member of the Afghan National Police who was helping the Marines train the Afghan Local Police.

Taliban spokesman Qari Yousef Ahmadi said by telephone that the attacker joined the insurgency after the shooting.

"Now, he is with us," Ahmadi said.

The district chief, Mohammad Sharif, said the shooting happened at a police checkpoint after a joint meal and a security meeting. The meal took place before dawn because of Ramadan, the month in which Muslims abstain from food during daylight hours.

Compared to the 25 attacks this year that have killed 31 foreign troops, there were 11 such attacks and 20 deaths in 2011, according to an Associated Press count. Each of the previous two years saw five such attacks.

The NATO coalition says it takes the rise in "green-on-blue" attacks seriously but insists they are not a sign of trouble for the plan to hand over security to Afghan forces.

"We are confident that those isolated incidents will have no effect on transition or on the quality of our forces," said Brig. Gen. Gunter Katz, a spokesman for NATO troops.

White House spokesman Jay Carney said President Barack Obama remains committed to his timeline to transfer the security lead to Afghan forces by the end of 2013.

"It is too early to say this latest incident is part of a stepped-up effort by insurgents," Carney said Friday. But he added that the administration considers the attacks serious and that U.S. commanders are evaluating Taliban tactics.

On Tuesday, two gunmen wearing Afghan army uniforms killed a U.S. soldier and wounded two others in Paktia province in the east. And on Thursday, two Afghan soldiers tried to gun down a group of NATO troops outside a military base in eastern Afghanistan. No international forces died, but one of the attackers was killed as NATO forces shot back.

Last year, a U.S. Army team led by a behavioral scientist produced a 70-page survey that revealed both Afghan and American soldiers hold disturbingly negative perceptions of the other.

According to the survey, many Afghan security personnel found U.S. troops "extremely arrogant, bullying and unwilling to listen to their advice" and sometimes lacking concern about Afghans' safety in combat. They accused the Americans of ignoring female privacy and using denigrating names for Afghans.

The U.S. hopes the Afghan Local Police, a village defense force backed by the national government, will become a key force in fighting the insurgency.

Just last month, a coalition statement touted the Marines' work training the Afghan Local Police in Sangin, describing a new academy in an Afghan National Police compound near a Marines base.

"During the three-week course, future police train in the basics of patrolling, vehicle and personnel searches, checkpoints, escalation of force, detainee procedures, marksmanship and Afghan law," the statement said. "After completing training, the new ALP are stationed at patrol bases in their hometowns."

Elsewhere in Helmand province on Friday, six Afghan civilians — three children, two women and a man — were killed when their car hit a roadside bomb, said Helmand police official Mohammad Ismail Khan. In neighboring Uruzgan province, insurgents stopped a civilian vehicle on a highway and killed two doctors, two engineers and two other civilians, said provincial spokesman Abdullah Emat. Also, an Afghan policeman was killed and another was wounded when the motorcycle they were riding hit a roadside bomb in the province, he said.

Separately, the U.S. government identified four Americans who were killed along with an Afghan civilian in a twin suicide attack in eastern Kunar province on Wednesday: USAID foreign service officer Ragaei Abdelfattah, Air Force Maj. Walter D. Gray, of Conyers, Ga.; Army Maj. Thomas E. Kennedy, of West Point, N.Y.; and Command Sgt. Maj. Kevin J. Griffin, of Laramie, Wyo.