The home secretary, Theresa May, has insisted that Abu Qatada will not return to Britain after the radical preacher was acquitted of terrorism charges in a Jordanian court.

In a ruling that brought a surprise end to a decade-long legal battle, a judge in Amman struck down the case against Qatada and declared him free to leave custody to rejoin his family and lawyers.

In a televised statement, May insisted Qatada would not return to Britain despite his acquittal: “Due process of law has taken place in Jordan, that is absolutely as it should be,” she said.

“The UK courts were very clear that Abu Qatada posed a threat to our national security – that’s why we were pleased as a government to be able to remove him from the United Kingdom. He is subject to a deportation order. He is also subject to a UN travel ban – that means he will not be returning to the UK.”

The preacher, who fought a bitter and protracted legal battle against extradition from his London home to face the charges, was accused of plotting terrorist attacks on Americans and Israelis during millennium celebrations in Jordan – charges he was convicted of in absentia in 2000.

He was finally deported in July last year after the UK and Jordan signed a treaty stating that evidence gathered against him through torture would not be used in any retrial.

Qatada’s lawyers always maintained that he had been convicted by the Jordanians using torture-tainted evidence from his alleged co-conspirators.

The Islamist preacher calculated that there would be no other evidence available to convict him when he returned voluntarily to Jordan on the basis of the “fair trial” treaty, saying that for the first time in 12 years he felt safe returning to Amman.

His calculation appeared to have paid off when, to loud cheers and shouts from members of his family, the judge dismissed the prosecution case as weak and inadmissible. “The accused is found innocent,” he announced.

Seven armed guards stood in front of Qatada’s cell as he entered the court in brown detainment robes. The cleric was quiet, blowing a kiss to his family members filling a row of courtroom seats. They sat calmly, some smiling. “Inshallah, he will be with us today,” his sister said.

Outside the courtroom, one of Qatada’s lawyers, Ghazi Althunibat, told reporters: “Justice took place today. The decision is aligned with Jordanian law and the UK treaty. He is innocent and he deserved to be declared innocent.”

Another of his lawyers, Husain Mubaidin, said he had expected the decision. “There is no substantial evidence against him in the first place,” he said. “Abu Qatada wanted to come back for a fair trial in Jordan and we are thankful that Britain sent him back. No further charges stand against him. He will walk free today.”

One of Qatada’s sons said: “We are very happy. We expected this.”

In Britain, his acquittal was less warmly received. David Blunkett, home secretary when Qatada was detained in 2002, said the length of time it took to deport the preacher made it harder to prosecute him successfully. “Abu Qatada managed to do what he wanted to do, which was to prevaricate for 10 years,” Blunkett said. “By doing that he’s made it very much more difficult for the prosecution. However, it also proves that he was wrong, because the case he made against extradition was that he wouldn’t receive a fair trial in Jordan, and he clearly has.”

Qatada was first detained in Britain in 2002 in the immediate aftermath of 9/11, and the failure to deport him was a major headache for successive home secretaries. The European court of human rights ruled that he could not be sent back to Jordan if he was to face trial based on torture-tainted evidence – a ruling that fuelled much Tory and tabloid hostility.

The trial was chaotic at times, with Qatada regularly pacing up and down his cage in the courtroom and apparently smuggling written statements out of his cell. In one speech from the dock, he denounced the beheading of two US journalists by Islamic State (Isis) militants, saying that reporters were “messengers of the truth” and killing them was in breach of Islamic teachings.

Outside court, Mubaidin restated his client’s opposition to Isis. “He didn’t make these statements because of pressure from Jordan’s courts,” he said, insisting Qatada supported the release of hostages. “He is against Daesh [the Arabic term for Isis] and everything they do. He believes their actions are against Islam.”