An injured refugee (2nd L) from the Australian-funded Manus Island detention centre is pictured in Lorengau after an alleged attack by a group of Papua New Guinean men in this picture taken on August 10, 2016 by photographer Matthew Abbott. Get Up/Matth

SYDNEY (Reuters) - A human rights group on Sunday said two refugees being held at a Papua New Guinea detention center were bashed by locals, fuelling criticism of Australia's tough offshore detention rules for asylum seekers.

Lobby group Get Up released photos of the two men, showing them with bloodied faces and bodies, after they were allegedly attacked by Manus Island locals while returning to the Australian-funded detention center after day release on Wednesday.

Almost 900 asylum seekers are held on Manus despite Papua New Guinea's Supreme Court ruling three months ago that their detention was illegal. Australia and Papua New Guinea have been fighting a legal battle since, each claiming the other has responsibility for resettling the men.

Under Australia's hardline immigration policy, anyone intercepted trying to reach the country by boat is sent for processing to camps on Manus or Nauru in the South Pacific. They are never eligible to be resettled in Australia.

Human rights advocates say tensions are rising as many in Papua New Guinea do not want the asylum seekers in their community after the anticipated closure of the center, which has a history of violent protests and self-harm by detainees.

Daniel Webb, a lawyer with the Human Rights Law Centre, said he witnessed the aftermath of the alleged attack in Lorengau and spoke with the men, Afghan Hazaras who have refugee status, two days later.

"As they were walking back to get the bus to the detention center they were surrounded by a group of seven locals, who abused them, robbed them and beat them," Webb told Reuters.

"One of the locals had an iron bar and was hitting them over the head. The assault ended when another Papua New Guinean man intervened."

Photographer Matthew Abbott said one of the men collapsed after walking to a nearby police station.

A spokeswoman for Australia's Department of Immigration said the men suffered cuts and bruises and were taken to a local hospital before being returned to the detention center.

PNG Police charged two men in relation to the assault, the spokeswoman said. PNG authorities could not immediately be reached for comment.

Australia's offshore detention program has increasingly come under the spotlight.

Leaked documents published by The Guardian Australia earlier this week detailed more than 2,000 incidents, including sexual abuse, assault and attempted self-harm, reported in the Nauru center over the past two years.

A spokesperson for the UN High Commissioner for Human Rights Ravina Shamdasani said on Friday the situation at the centers on both Nauru and Manus was becoming "increasingly dire and untenable."