Asim Thabit Abdullah al-Khalaqi, a Yemeni national who was held at the US military prison for 11 years, died on 7 May, as a result of maltreatment in detention and poor healthcare after he was released, according to a friend and former inmate.

Khalaqi, a Yemeni national, died of kidney failure, said Jihad Dhiab (also known as Abu Wa’el Dhiab), a Syrian ex-Guantánamo prisoner who is now living in Uruguay.

Khalaqi’s death was confirmed by both the Pentagon and the State Department on Friday. Khalaqi’s lawyer, Ellis Johnston, a public defender in San Diego, could not be reached for comment.

According to Department of Defense records, Khalaqi, who was 46 upon his release last December, was one of the first terrorist suspects sent to the US naval base for interrogation. Born in Saudi Arabia, he had been suspected of serving Osama bin Laden’s Arab brigade. He was arrested in Pakistan in December 2001 in the company of a senior al-Qaida figure, and has been held at Guantánamo since 17 January 2002. He was never tried in court.

“It was a consequence of his years in Guantánamo and the lack of proper healthcare both in the prison and in Kazakhstan,” Dhiab told the Guardian in one of his first interviews since being freed.

Khalaqi reportedly suffered from chronic gout. “He repeatedly requested health attention through his lawyer, but after a few medical checks he was told he was fine,” Dhiab said.

A spokesman for the Defense Department denied Dhiab’s allegations, claiming all detainees are screened before transfer.

“All detainees have access to the same outstanding medical care as the US service members serving at Guantánamo, and are given a thorough health screening prior to transfer,” said Lieutenant Colonel Myles B Caggins III. “Mr al-Khalaqi would not have been transferred if he failed the health screening.”

Dr Stephen Xenakis, the anti-torture adviser at Physicians for Human Rights who also testified in front of Congress on Dhiab’s case, said a number of factors contribute to less than adequate care for inmates at Guantánamo, including limitations on resources and equipment, and a constantly rotating medical staff that is unable to provide continuity of care, essential for the ageing population at the prison.

“Care providers there are more constrained and managed by the guards and authorities than they are in prisons in the US,” he said. “It causes a lot of variation. So if a prisoner is liked, he may get the care he needs, and if not, the guards will intercede in a way and effectively deny the person what he needs.”

Khalaqi was released along with four other detainees – two Yemeni and two Tunisian – to Kazakhstan for resettlement. Though the exact conditions of their release are not clear, the five were considered “free men” after the transfer.

In the weeks before his death the 47-year-old was unable to walk, Dhiab said. “When Red Cross staff paid a visit to his home, he threw the keys through the window, so the visitors could open the door by themselves.”

“We talked on Skype days before his death,” he said. “He told me he wished to get married.”

Some former Guantánamo prisoners in Kazakhstan were forbidden to attend the funeral by local authorities who cited “internal security concerns”, Dhiab said.

As part of Obama’s promise to close down the prison, the US has sent dozens of Guantánamo prisoners to third countries in recent years to be resettled. Though the White House says these are steps towards closure of the base, Dhiab sees the move in a more sceptical light.

“When a prisoner’s health becomes very fragile, the American military seek to release him as soon as possible to avoid the responsibility of a death in prison,” he alleged.

Detention conditions badly affected the health of inmates, many of whom are said to suffer from prostate and eye diseases, high cholesterol and hypertension. The most seriously ill of the group sent to Kazakhstan is Tunisian Abdullah Bin Ali al-Lutfi, who has a mechanical heart valve and suffers from chronic heart rhythm, kidney stones and high blood pressure. He is 49 years old.

Xenakis said that is reasonable to assume that detainees held at Guantánamo and subjected to torture will have long-term medical problems.

Xenakis said the US has a responsibility to arrange the most beneficial and therapeutic handoff for former prisoners who are being transferred to third countries, saying “that responsibility is accepted medical practice, otherwise it would appear as if we have abandoned our patients”.

“I don’t think that happened here,” said Xenakis of Khalaqi’s post-detention care. Xenakis personally approached the State and Defense departments with his concerns.

Dhiab, who is recovering from hunger strikes and forced feedings, still has to walk with crutches. He said the problems facing former detainees in Kazakhstan was identical to what he and five other former prisoners experienced in Uruguay. “We have visited the hospital many times, but without getting the specific and proper healthcare we need.”

The ex-detainees recently protested outside the US embassy in Montevideo to demand Washington take responsibility for their situation – suffering from the after-effects of a long internment, forced to adapt to a strange country, separated from their families and troubled by health and economic problems.

“I do not seek money or a house from the Uruguayan government. My goal is to bring some justice to the lives of those released and those still behind bars,” said Dhiab, who mounted several legal challenges against the US while in prison and is now continuing his campaign through the media from his new home.

Xenakis said that research and data on POWs from Vietnam and others shows that people who have been subjected to torture in detention “will have problems for the rest of their lives”.

“After jailing those people for years with no charges, the US sets them free without providing any support to ease the damage they inflicted,” Dhiab said.

This article was amended on 26 May 2015 to clarify the sourcing of the fifth paragraph.