Photo images of a Bangladeshi asylum seeker in Japan making a hospital visit while roped and in handcuffs have sparked an online debate on the country's treatment of foreigners detained at immigration centers.

The images of a cuffed Mahruf Abdullah walking inside a hospital accompanied by immigration officials in uniforms, with one of them holding a rope tied to Abdullah's waist, were taken by a hospital visitor in October and have since been posted on social media by Asahi Oda, a supporter of foreigners.

Abdullah, 36, has agreed to be named and to have the images shared, saying he hopes to let people know how people like him are being treated.

"I am not a criminal," he told Kyodo News, saying the handcuffs and the rope were humiliating. The asylum seeker had his waist and knees examined by a doctor and the Tokyo Regional Immigration Bureau said the handcuffs and rope were necessary to prevent him from fleeing.

The images have so far drawn more than 1,000 online responses, including likes and shares. One user commented, "I find it cruel given he is not a burglar or a murderer," while another said, "We need restraints to some extent if it is feared he'll flee."

Japan can keep asylum seekers without legitimate visa status at immigration detention centers as a preparation for deporting them. Those who were deemed clearly not to meet the requirements or have applied many times for asylum in the initial screening can be detained.

The immigration bureau said it applies handcuffs and a rope to detainees in accordance with a Justice Ministry ordinance, but it also takes measures to prevent detainees being seen by the public in such restraints. In the photo images, Abdullah's handcuffs were covered.

The bureau said the images in question made it appear as if he was exposed for some time to public view but only captured one scene from the visit.

In 1995, the Osaka District Court ordered the state to compensate a Japanese defendant in a criminal trial who was walked in handcuffs and a rope during a hospital visit to see an eye doctor, recognizing it as a violation of personal rights. The ruling was later upheld by the Supreme Court.

The Justice Ministry's Correction Bureau said it tries to keep hospital visits by prison inmates and detainees away from public view by making its officials change out of uniforms and enter medical institutions through backdoors.

"The human rights (of foreigners held at immigration centers) should be protected as much as or even more than criminal defendants" who are assumed not guilty until courts find them otherwise, said Yasuzo Kitamura, a professor of international human rights law at Chuo University's law school.

Detention of foreigners at immigration centers is based on administrative rather than criminal procedures, he said.