A high court judge has said she is “deeply concerned” about the behaviour of Amber Rudd for failing to release a survivor of torture from detention despite repeated court orders requiring her to do so.

On Wednesday Mrs Justice Nicola Davies DBE presided over an emergency high court hearing to examine the home secretary’s delay in releasing an asylum seeker who had been tortured in a Libyan prison with electric shocks and falaka – beating on the soles of the feet.

“The court is deeply concerned,” she said. “Four weeks have elapsed since an order was made.”

She added that the home secretary had failed to provide a satisfactory explanation for the delays in releasing the man from detention.

It is unusual for a high court judge to condemn a senior government minister in such strong terms. In a mark of her disquiet about the secretary of state’s conduct she not only awarded costs against her but also made an indemnity order – something reserved for conduct or circumstances that take a case “out of the norm” and a mark of disapproval by a judge.

The asylum seeker from Chad, who cannot be named for legal reasons, first applied for bail so that he could be released from immigration detention in April 2017. He experienced persecution both in his home country and on his journey to reach Europe when he was imprisoned in Libya.

The home secretary is not disputing that he is a victim of torture who should not be detained but has failed to abide by a series of court orders instructing that he should have his liberty restored.

The first order to release him from detention was made on 26 July by the immigration tribunal. When officials failed to release him the case went to the high court and Davies made an order that he had to be released by 5pm on 11 August. This did not happen. The Home Office then applied for two extensions to the order for 18 August and 25 August.

At Wednesday’s high court hearing the home secretary failed to provide a barrister to defend the government’s position. Instead a government solicitor had to speak and apologised to the court for his boss’s behaviour.

“I can only apologise,” he said.

The judge said she found it “inconceivable” that the Home Office was unable to find a barrister to attend the high court hearing.

The asylum seeker’s barrister Raza Halim condemned the home secretary for failing to abide by the series of court orders. “These orders are batted into the air as far as the secretary of state is concerned,” he said in court.

The asylum seeker’s solicitor Hannah Baynes, of Duncan Lewis solicitors, said her client was extremely vulnerable.

“I visited him in detention and he kept saying: ‘I want to get out of here. I want to leave. Why are they not releasing me?’” she said. “The Home Office needs to realise that deprivation of liberty is a serious abuse of fundamental rights, even more so when it involves a torture victim. We have seen delays of this kind far too often. The Home Office needs to act more competently and more expeditiously when it comes to complying with orders of the court.”

The man has a conviction for arson thought to be linked to the mental health problems he is experiencing as a result of his torture. Home Office officials said there had been a delay in finding him suitable accommodation because of his offence.

But the judge said the home secretary had provided “less than satisfactory reasons” for the delay.

A Home Office spokesperson said: “We do not routinely comment on individual cases.”

In a separate high court hearing the deputy high court judge Anne Whyte QC found that the man had been unlawfully detained and was entitled to substantial damages. She found there was “an unacceptable failure to identify him as a potentially vulnerable person”.