Two doctors testified Monday that medical officials at the U.S. military prison at Guantanamo Bay acted too harshly in their treatment of a detainee who has been force-fed while on hunger strikes — at one point issuing a directive that his socks and boxer shorts be taken from him.

The 43-year-old Syrian detainee, Abu Wa’el Dhiab, hopes the testimony from the American physicians will help persuade a federal judge in Washington to modify the way he is treated by officials at the prison in Cuba. U.S. District Judge Gladys Kessler in May ordered that the U.S. military can force-feed Dhiab to prevent him from dying.

Monday’s proceedings centered on exactly how the feeding is carried out. Dhiab has used hunger strikes to protest his continued detention, his attorneys said, and military officials should be restricted in how and when they can take him from his cell, strap him to what detainees call the “torture chair” and insert a tube up his nose in the name of keeping him alive.

“Mr. Dhiab does not want to die,” attorney Eric Lewis said in court. “He wants to be treated like a human being.”

Justice Department lawyers argued that Dhiab is a danger to himself and those around him and that he is putting his health at risk by refusing to eat regularly.

U.S. Navy medical personnel displays an enteral feeding tube, used for force-feeding detainees. Guantanamo prisoner, 43-year-old Abu Wa’el Dhiab hopes to persuade a federal judge to modify the way he is treated by prison officials. (Charles Dharapak/AP)

Dhiab was arrested in Pakistan in 2002 and has been detained since without any charges being filed against him. He was cleared for transfer by the Obama administration in 2009, but the government has not been able to repatriate him, in part because of fears about how he would be treated in Syria. Lewis said his client is “looking forward to the day when he can leave Guantanamo.”

The case is a complicated one that already has shone a light on some unflattering practices at the military prison — and threatens to do so again. Kessler rejected the government’s request to seal this week’s proceedings, though she allowed some confidential matters to be discussed behind closed doors.

The judge further ordered the eventual release of a redacted video that shows Dhiab being force-fed. Dhiab has been on hunger strikes on and off for seven years.

Dhiab’s attorneys want a doctor, rather than a prison official, to determine when Dhiab should be force-fed and want it done only when Dhiab is in immediate danger. They want him to be taken to the feedings in a wheelchair, and they want the feedings to be conducted using a one-point, rather than a five-point, restraint. They also want Dhiab’s feeding tube to be left in for three days at a time to reduce the frequency with which it is inserted and removed from his nose.

Justice Department attorney Andrew Warden argued Monday that Dhiab “undermines his own health by refusing to eat” and said that inserting a nasal tube was “not a painful procedure.” Warden said that prison officials had, since September, been allowing Dhiab to go to the feedings in his wheelchair and that they could not leave the tube in, out of concern that Dhiab might become infected — or use it to harm himself or others. Records displayed at the hearing indicate that at one point he wrapped his neck with a shackle.

Warden said Dhiab had kicked prison medical staffers and thrown urine and feces at them. He said an injunction from Kessler would “rewrite medical care at Guantanamo Bay.”

As they began presenting their case Monday, Dhiab’s attorneys seemed to argue that medical care at the prison could use some revamping. Their first witness — Boston University professor and Boston Medical Center doctor Sondra Crosby — testified that the facility was ill-equipped to deal with an aging population. For example, she said, it lacks an MRI machine.

Crosby testified that in Dhiab’s case, the staffers had “blurred” the distinction between discipline and treatment. Of particular note: In June 2013, Crosby said, a doctor ordered that Dhiab lose access to a number of supplies, including his socks and boxer shorts.

“I can’t think of any reason why a physician would write an order to discontinue socks or boxer shorts,” Crosby testified. “It seems punitive on the surface.”

Crosby noted that Dhiab ate voluntarily in front of her, and his attorneys suggested that he would be willing to do so if he were treated differently.

Stephen Xenakis, a doctor and retired army brigadier general, testified that although he was given limited information, he did not believe Dhiab was physically aggressive or even anti-West or anti-American. He said it seemed prison officials sometimes overrode sound medical decisions in Dhiab’s case — perhaps most notably by continuing to send guards in protective gear to bind him and remove him from his cell for feedings, even after he was given approval to use a wheelchair.

“I wouldn’t consider him dangerous at all,” Xenakis said.

Xenakis acknowledged in response to questions from a government attorney that he left the Army amid an investigation and later sued his former employer. He also admitted opining frequently on the subject of detainee treatment. A federal judge in a terrorism case once deemed his remarks “obviously partisan.”

Testimony is expected to continue Tuesday.