Image caption Nato troops have been increasingly subjected to 'green on blue' attacks

An investigation has been launched after an Afghan soldier who had recently been jailed for firing on Nato troops managed to escape from custody.

Officials say he was able to walk out of a heavily guarded military base, with the help of a guard.

The soldier had been arrested for killing one Slovakian Nato soldier, and injuring six others, at Kandahar international airbase last week.

A Taliban spokesman said the rogue soldier had now joined their cause.

The BBC's Bilal Sarwary in Kabul says news of the escape is an embarrassment for both the Afghan defence ministry and the army.

"The rogue soldier escaped with the help of one or more people," said General Zahir Azimi, a spokesman for the Afghan defence ministry.

"An Afghan National Army (ANA) officer helped him escape from the ANA custody inside the army core where he was at the detention centre," Gen Azimi told a press conference.

It appears that a supervising guard took the soldier from his prison cell to a military hospital, saying he needed to see a doctor. There he was unshackled and the two men then left the compound.

"The supervisor had a clean record, and was trusted. We don't know the reasons why he did this," General Abdul Hameed, the top Afghan army commander in the south, told the BBC.

The killing of Nato forces at the hands of Taliban infiltrators and rogue Afghan soldiers has become one of the defining features of this phase of the conflict in Afghanistan.

Our correspondent says these incidents have undermined Nato's ambition to fight ''shoulder to shoulder'' with Afghans against the Taliban.

More than 100 Nato soldiers have been killed in such "green-on-blue" attacks since 2007.