Pakistan’s supreme court has ordered the release of a UK-born Islamist who had been sentenced to death over the 2002 beheading of US journalist Daniel Pearl.

In a two-to-one verdict by a three-judge panel, the court on Thursday ordered that Ahmed Omar Saeed Sheikh — who has served 18 years in prison in connection with Mr Pearl’s murder — should be freed.

Three other men convicted in the case were also ordered to be released.

Mr Pearl, a reporter for The Wall Street Journal, was kidnapped in the port city of Karachi while investigating a story about al-Qaeda and its affiliates in Pakistan. After being tortured for several days he was beheaded, and a video of his murder was delivered to US officials.

A regional court in Sindh last April overturned an earlier death penalty and found Sheikh guilty of the lesser charge of kidnapping, commuting his sentence to seven years in jail. He was cleared for release on the basis of time served.

Pearl’s family released a statement on Thursday condemning the supreme court’s decision as “a complete travesty of justice” which “endangered journalists everywhere and the people of Pakistan”.

Legal experts said Pearl’s family and the Pakistani government, which has opposed the release of the four men, could ask the supreme court to review its decision. Pakistani officials have said they expect the US to continue to pursue the four men if they are released.

Analysts warned the verdict would reinforce Pakistan’s image as a country that tolerates militancy. “Pakistan will be seen once again as a country where militants and militancy have space [to operate]” said Ghazi Salahuddin, a commentator for the English language newspaper The News International.

Sheikh who studied at the London School of Economics, had joined militant groups operating in India and Pakistan. He was arrested in 1994 in India in connection with the kidnapping of western tourists.

He was released from an Indian prison in 1999 as part of a hostage exchange, after Islamist militants hijacked an Indian commercial airliner and flew it to Afghanistan while that country was under Taliban rule.