A court in Pakistan has ordered the release of the British-born militant who was accused of killing an American journalist in 2002.
Omar Sheikh was acquitted of Daniel Pearl's murder earlier this year but had remained in jail after an appeal against that decision began.
The Sindh High Court in Karachi has now ruled that Mr Sheikh's temporary detention was illegal.
A lawyer for Mr Sheikh said he could be released within the next 24 hours.
The abduction and gruesome beheading of Wall Street Journal reporter Pearl in the southern city of Karachi prompted shock and outrage.
Mr Sheikh was arrested days after Pearl's kidnapping and later convicted of the murder by an anti-terrorism court. He had been on death row since the conviction.
But in April this year, the Sindh High Court downgraded Mr Sheikh's conviction to the lesser crime of kidnapping, and acquitted three other men connected to the case.
The decision drew condemnation from Mr Pearl's family. They and the Pakistani government have challenged the decision, in a case that is ongoing.
It is not yet clear if more measures can be used to keep Mr Sheikh in detention while the appeal is heard.
The US state department condemned the ruling, and said it had been assured the accused had not been released "at this time".
Pledging to support the Pearl family, it said: "We continue to honour Daniel Pearl's legacy as a courageous journalist."
What happened to Daniel Pearl?
Mr Pearl, who was the Wall Street Journal's South Asia bureau chief, went missing in January 2002.
He had been researching links between Islamist militant activity in Karachi and Richard Reid, who tried to blow up a passenger plane using bombs hidden in his shoes.
Prosecutors accused Mr Sheikh of luring him to a meeting with an Islamic cleric. Mr Pearl and Mr Sheikh had built a relationship discussing concerns about their wives, who were both pregnant at the time.
Soon after Mr Pearl disappeared, Pakistani and US news organisations received emails from the previously unknown National Movement for the Restoration of Pakistani Sovereignty. The group made a list of demands, including better treatment for Pakistani prisoners in the US.
Almost a month later, a video showing the 38-year-old's beheading was sent to the US consulate in Karachi.
Who is Ahmed Omar Saeed Sheikh?
Born in London in 1973, Mr Sheikh attended an independent school before going on to study at the London School of Economics. He did not graduate, failing to return after driving aid to Bosnia after his first year.
He was arrested in India in 1994 and served time in prison in connection with the kidnapping of four tourists - three British and one American.
He was released from jail as part of demands by militants who hijacked a plane in 1999.
In American media reports citing government officials, Mr Sheikh has been accused of transferring money to one of the militants involved in the 11 September 2001 attacks on the US.