The immigration agency revealed Tuesday that a Nigerian man died of starvation in June at one of its facilities in southwestern Japan after he went on hunger strike over his prolonged detention.

The first such death in Japan occurred at the immigration center in Omura, Nagasaki Prefecture, on June 24, according to the Immigration Services Agency.

The agency concluded in a report that the man, who was in his 40s, had refused food or medical treatment and that the facility could not forcibly treat him, saying its response to the situation was "not inappropriate."

The man was convicted in various criminal cases including theft and was taken into the detention center after he was provisionally released from prison in November 2015. The report said he could not be released from the center given the seriousness and the repetitious nature of his crimes.

Japan's immigration detention centers hold people who have overstayed their visas or who have been ordered to be deported, among others. Many people end up being detained for a long time if they refuse to be deported or if their home countries refuse to accept their return.

There have been other cases of hunger strikes by detainees who seek to be freed from the centers, and civic groups have criticized the immigration authorities for keeping them for extensive periods, saying it is a human rights issue.

The agency also said in the report, "The problem of prolonged detainment should be resolved by facilitating repatriation," while calling for considering measures to prevent hunger strikes and making it mandatory for detention facilities to give medical treatment to detainees when necessary.

The center learned on May 30 that the man had stopped eating. Officials at the facility checked his health and tried to persuade him to eat or receive treatment, according to the report.

The man, who had married a Japanese woman but subsequently divorced, had refused to be deported because he had family in Japan.

As of the end of last year, 1,246 people were being detained at immigration facilities, with 681 of them being detained for more than 6 months, according to the agency.