A former NHS doctor turned extremist fighter has been killed in Afghanistan alongside three other jihadists by Pakistani intelligence officers working under cover. The extremist preacher Anjem Choudary has written an obituary for Tariq Ali, as they got to know each other after Ali sought and was granted asylum in the UK.

Ali, who was also known as Abu Obaidah al-Islamabadi, was confirmed dead by Ehsanullah Ehsan, a spokesman for the Pakistani Taliban (TTP), the Times has reported. He was killed by Pakistani Intelligence (ISI) agents who were posing as Taliban fighters.

“There were four militants involved in the killing,” he said. “They joined us almost four months ago.” He vowed to avenge the men’s deaths.

Ali had been a Captain in the Palestian army, but had fled to the UK in 2004 seeking asylum after being threated with a court marshal for refusing to kill Talibani fighters. In 2012 he met radical preacher Anjem Choudary at a talk held in Regent’s Park Mosque, London.

“Once we were acquainted I soon realised that Tariq Ali was no ordinary Muslim but rather in many respects an extremely exceptional one,” Choudary has written in an obituary for Ali. “Here was a man who refused to take orders when he was a Captain in the Pakistan army to fight against the Taleban because he feared dying at the hands of Mujahideen and going to the hellfire, despite the risk of himself being court marshalled and facing the firing squad.”

During his time in the UK, Ali worked as a doctor in NHS hospitals in London and Cambridge. Choudary has recounted how Ali once operated on an infected finger in the back room of a Café in London using local anasthetic and surgical equipment taken from a hospital.

Choudary soon persuaded Ali to speak at events all over Britain alongside him. “A unique attribute of Tariq is that he never forgot the seriousness of the situation that the Unmah finds itself in and disliked drawing attention away from the serious task of calling to Islam and enjoining good and forbidding evil,” Choudary said.

In May 2013 Ali was charged with violent disorder after repeatedly hitting a rally bystander with a placard stick and calling for jihad in Syria. Rather than face the charges he fled the country, despite having his passport confiscated, whilst on bail. He was convicted in absentia at the Old Bailey and sentenced to 15 months in jail.

Last November he resurfaced in a video aimed at Western youths, calling them to jihad. During the 13 minute film Ali, speaking both English and Urdu, recounts his journey from Britain to Pakistan via Croatia, before urging young Muslims to join the Taliban and overthrow the Palestinian Government.

Palestinian intelligence forces have expressed relief at his death. Mushtaq Yusufzai, an expert on the TTP said: “He was an insider who used to share immoral stories with young fighters such as the drinking habits of [Pakistani] army officers.”