A gunman wearing an Afghan military uniform killed one NATO soldier and wounded five others at a base in the capital Kabul on Wednesday, officials said, in the latest so-called "insider attack".

The nationalities of the soldiers was not immediately known, with NATO saying it was still investigating the incident.

The shooting occurred as NATO service members were inspecting the base on Wednesday morning, said defence ministry spokesman Dawlat Waziri.

"As a result of the attack one Resolute Service (NATO) member was killed and five others were wounded," Waziri told AFP. "The shooter was also killed."

So-called "green-on-blue" attacks -- when Afghan soldiers or police turn their guns on international troops -- have been a major problem during NATO's long years fighting alongside Afghan forces.

Gunmen wearing Afghan military uniforms shot dead two Romanian soldiers in the southern province of Kandahar in May.

In a similar attack in August last year, a man wearing an Afghan military uniform shot dead two American soldiers in the southern opium-rich province of Helmand.

And in April last year an American soldier was killed in a firefight between US and Afghan troops in eastern Afghanistan.

Western officials say most such attacks stem from personal grudges and cultural misunderstandings rather than insurgent plots.

The killings have bred fierce mistrust between local and foreign forces even as the rate of such incidents has dropped in recent years.

NATO troops have adopted special security measures in recent years to try to counter the threat.