In an extremely rare legal manoeuvre, the Obama administration has challenged a legal request to free a hunger-striking Guantánamo Bay detainee entirely in secret.

US officials said the objection to freeing Tariq Ba Odah, who is undernourished to the point of starvation, and the decision to challenge his legal gambit outside of public view, are indications that the Obama administration will fight tenaciously to stop detainees from seeking freedom in federal courts, despite Barack Obama’s oft-repeated pledge to close Guantánamo.

Late on Friday, the US justice department submitted a long-awaited filing in Ba Odah’s habeas corpus petition. The filing was kept under seal, a rarity for a challenge to the so-called “great writ,” the underpinning of Anglo-American jurisprudence.

The filing itself simply reads: “Sealed opposition.”

Attorneys for Ba Odah are currently reviewing the sealed filing but said they cannot comment on the substance yet. Keeping the US opposition secret is “rare and unnecessary,” said Wells Dixon of the Center for Constitutional Rights, which has Ba Odah as a client.

Ba Odah, a 36-year-old Yemeni who has spent 13 years at Guantánamo, currently risks dying in the Guantánamo Bay facility where he has spent a third of his life. He weighs 74 pounds (34kg), the result of years of rejecting food and forced feeding through a tube inserted through his nose into his stomach.

The Obama administration’s 2009 review cleared the Yemeni national for transfer, an indication the government does not possess information sufficient to charge him with an offense nor considers him a threat to US or allied security.

In June, lawyers for Ba Odah submitted into the court record statements from doctors indicating that his weight loss – he weighs approximately 56% of his ideal body weight – has reached the point of irreparable medical harm.

“There are limits to what the human body can endure, and at 74.5 pounds – no matter the precise nature of his underlying medical complications – Mr Ba Odah is undoubtedly reaching those limits and may soon exceed them,” Sondra Crosby of Boston Medical Center told the US district court for the District of Columbia on 25 June.

A US official, speaking on condition of anonymity, said hardline elements within the US defense department are convinced that hunger strikes – referred to euphemistically at Guantánamo as “non-religious fasting” – are functionally a method of warfare. On that view, permitting Ba Odah’s challenge to his detention to go unanswered would both represent a substantive defeat and would encourage intensification of hunger strikes.

The official indicated that the motive for sealing the motion was to shield the government from embarrassment, rather than protecting classified information.

Ba Odah’s lawyers reacted with surprise and anger at the government’s sealed challenge. While they hoped the US would not oppose the Yemeni’s request for freedom, they also did not expect the US to keep its reasons for the challenge secret.

Omar Farah, Ba Odah’s attorney with the Center for Constitutional Rights, said: “We are deeply disappointed by this secret filing. It is a transparent attempt to hide the fact that the Obama administration’s interagency process for closing Guantánamo is an incoherent mess, and it is plainly intended to conceal the inconsistency between the administration’s stated intention to close Guantánamo and the steps taken to transfer cleared men. The administration simply wants to avoid public criticism and accountability.”

National-security lawyers said they could not think of a case where the government had filed a sealed challenge to a habeas petition.

“That would be unique, in my experience,” said attorney Joshua Dratel, who has represented several accused terrorists and Guantánamo detainees.

“I’ve never heard of that in a habeas context. It’s rare in a criminal context.”

Ba Odah only represents one aspect of the Obama administration’s acrimonious internal struggles over closing Guantánamo Bay. The Guardian revealed on 13 August that Pentagon has for years blocked the transfers of cleared detainees for whom the state department had arranged deals to remove from Guantánamo into home custody, including Shaker Aamer, a UK permanent resident.

“Today’s filing in opposition was made under seal, in accordance with procedures used in the Guantánamo habeas cases when information regarding detainee medical care and related issues is involved. A public version of the filing is being prepared and will be filed on the public record,” a justice department spokesperson said, denying that the opposition to Ba Odah’s release contradicted the goal of closing the detention facility.

Farah, Ba Odah’s attorney, called sealing the filing an “unnecessary” move by the Obama administration.

“There is nothing sensitive about this pivotal moment that needs to be withheld from the public. Mr Ba Odah’s grave medical condition is not in dispute. Given that he has been cleared since 2009, there is no dispute about whether he should be approved for transfer. All the president has to decide is whether to exercise his discretion not to contest the motion and release Mr Ba Odah so that he does not die,” he said.