An Afghan soldier who shot dead a Nato soldier and injured several others last week has fled a military jail with the help of the officer in charge of prison security, Afghan and Nato officials said.

The security chief claimed the man was ill and needed to go to hospital, and once the detainee's shackles were off the pair escaped. They are believed to have headed towards the eastern mountain provinces, full of lawless pockets where insurgents hold sway.

The incident in Kandahar is the latest blow to western efforts to train Afghanistan's patchy and fast-growing army and police before the departure of all foreign combat troops next year. Last year a spate of insider attacks claimed around 60 lives and severely strained relations between Afghan troops and coalition forces working on the training mission.

The toll is down to nine deaths so far this year after better vetting of Afghan recruits, the deployment of armed "guardian angels" who follow foreign forces at any meeting with Afghans, and other measures. But the killing on Kandahar airfield and subsequent escape underline pervasive resentment of foreign forces among the soldiers and police they are ostensibly there to support.

The dead and wounded were all Slovakians. The eastern European country has more than 200 troops stationed in Afghanistan, and the death was the first among their troops.

Javed Faisal, spokesman for the governor of Kandahar province, said: "Four days ago, a soldier who was in the air force area opened fire on [Nato] soldiers. We put him in prison, but yesterday afternoon the head of the security for the jail helped the prisoner and ran away with him."

Heinz Feldmann, spokesman for the Nato-led coalition, said: "We have full confidence in our Afghan partners that they will do the investigation and that they will be able to bring this individual back into their custody."

A defence ministry spokesman said a team was investigating. He refused to confirm that the attacker was a soldier, saying only that he was dressed in an Afghan army uniform – which are freely, if illegally, available in bazaars around the country.

The Taliban said the shooter, whom they named as Isanullah, had joined the insurgents along with his rescuer. The New York Times reported that he had said he opened fire because he was angry about raids in his village in eastern Nangarhar province. The Taliban have in the past claimed attacks by disgruntled police and soldiers as planned shootings by infiltrators.

Afghan forces have also suffered badly from insider attacks, with infiltrators gunning down and poisoning police officers and soldiers.

Mokthar Amiri contributed reporting