By Sadar Razmal

KUNDUZ, Afghanistan (Reuters) - As many as 12 Afghan soldiers were killed in their sleep by comrades in an outpost near the northern city of Kunduz, an official said on Tuesday, in the latest so-called "insider attack".

Two soldiers with suspected links to the Taliban fled and joined the insurgents after carrying out the attack overnight, said Sher Aziz Kamawal, a senior police commander in Kunduz.

The outpost was among many forming a protective ring around Kunduz, which was briefly captured by the Taliban a year ago, the first time the movement had seized a provincial capital since losing power in 2001.

Insider attacks have plagued both Afghan and international military forces in the country, undermining trust and morale.

The Western-trained and backed Afghan government forces are battling various insurgent groups, including the Taliban, who say they are fighting to expel foreign troops and reestablish a fundamentalist Muslim regime.

(Writing by Josh Smith; Editing by Nick Macfie)