Two American civilians and two Afghan soldiers have been killed in a shooting on a northern Afghan military base, Nato said.

An Afghan soldier who trained others at the base outside Mazar-e-Sharif started shooting during a weapons exercise on Tuesday, the international military coalition said in a statement.

The shooter was one of those killed, and it was not immediately clear if he targeted someone or if bullets had gone astray. It also was not clear how many people fired weapons.

NATO and Afghan forces are jointly investigating, Defense Ministry spokesman Gen. Mohammad Zahir Azimi said. There were no immediate details on the U.S. civilians, but contractors commonly work as trainers at such bases.

Intentional shootings by Afghans against coalition partners have occurred previously but still are rare.

Earlier this month, an Afghan soldier killed three British service members with gunfire and a rocket-propelled grenade in the dead of night.

The soldier fled after that attack, leaving his motive unclear. But the Taliban claimed he was a militant sympathizer taken in by insurgents after the assault.

In November, an Afghan policeman killed five British soldiers at a checkpoint in Helmand.

The attacks come as the international coalition is ramping up training of Afghan soldiers and policemen so they can ultimately take responsibility for securing and defending the nation.

The speed with which Afghan security forces are growing - the allies set an interim goal of expanding the Afghan army from 85,000 in 2009 to 134,000 troops by October 2011 - has raised concerns about infiltration by the Taliban and the professionalism of the forces.