Image caption The attacker, identified only as Nargis, was married with three children

An Afghan policewoman has killed a US civilian aide at the police headquarters in Kabul.

It is believed to be the first such insider attack carried out by a woman. She is now in custody.

In a separate incident, at least five local policemen were killed by another officer in northern Afghanistan.

There has been a rise in incidents in which Afghan security forces members have shot dead either foreign personnel or their own colleagues.

In Monday's attack in Kabul, Afghan officials said the 33-year-old officer, who they named only as Nargis, arrived at the HQ looking for the police chief, the governor of Kabul or the head of the criminal investigation department.

When she was unable to locate them she went to the canteen and fired one bullet at the aide. She then fired at officers who tried to arrest her.

Afghan officials said the woman was married to an officer with the criminal investigation department and has three children.

She graduated from the national police academy six years ago with the rank of sergeant, they said.

Investigators are checking whether she has links to the Taliban or al-Qaeda.

Analysis This "green-on-blue" incident in the Kabul police headquarters highlights the concern about whether Afghan and Nato forces can work together after most foreign troops leave the country in the next two years. After 2014 Nato will primarily be on a training mission requiring close working relations and trust between Afghan forces and foreign troops. Such attacks raise more questions about whether such a close relationship is feasible.

Initial reports suggested the victim was a military adviser, but Nato's Isaf force later described him in a statement as "a civilian employee" of Isaf.

"We can confirm that a civilian police adviser was shot and killed this morning by a suspected member of the Afghan uniformed police," a Nato spokesman said.

The police compound is close to the interior ministry where two US officers were shot dead in February amid anger over the unintentional burning of Korans at a Nato base in the country.

More than 50 members of the Nato-led force in Afghanistan have been killed by Afghans wearing army or police uniforms this year, in a major crisis of trust between supposed allies in the war against militants.

Some of the attacks were carried out by Taliban infiltrators, others by Afghans angry at the actions of their foreign colleagues. Often the precise motive is unclear.

'Taliban infiltrator'

Monday's killing in Kabul came just hours after a local policeman killed at least five colleagues in the remote Khosh Tepa district in Jowzjan province.

Image caption Many women are being recruited into Afghanistan's police force

Afghan officials say the policeman escaped after the shooting and fled to join the Taliban, taking the weapons of his colleagues with him.

Afghan local police forces are recruited from villages, and often include former insurgents.

A spokesman for the Taliban told the BBC the rogue policemen in Khosh Tepa had been a Taliban infiltrator for some time.

In September, the US suspended training for local police recruits because of such "insider attacks".

It said it was carrying out checks on whether recruits had links to the Taliban.

Training Afghan security forces is an essential part of Nato's strategy before foreign combat troops pull out in 2014.