It has also decriminalised suicide, an issue due to mental health problems among refugees deported from Australia

BANGKOK, May 30 (Thomson Reuters Foundation) - The tiny Pacific island nation of Nauru has legalised homosexuality, replacing its century-old criminal code with a new law that also criminalises slavery and broadens the definition of rape to apply to married and unmarried couples.

In addition, the Crimes Act 2016 decriminalises suicide, which became an issue after refugees deported from Australia to a controversial Nauru detention centre committed or attempted suicide.

Nauru announced on Friday that the Crimes Act 2016 would replace the Nauruan Criminal Code of 1899. The government's decision to decriminalise homosexuality and suicide - in compliance with obligations under international treaties - showed "progressive leadership", it said.

Edmund Settle, policy advisor for the United Nations Development Programme in Bangkok, praised Nauru for setting "a positive example in the Pacific region".

"The government of Nauru has demonstrated leadership in protecting sexual and gender minorities from violence and discrimination," Settle said by email.

With a population of about 10,000 living on a 21-sq km (8 sq mile) island, around a third the size of Manhattan, Nauru has been in the media spotlight over its agreement with Australia to take in asylum seekers intercepted while trying to reach Australian shores.

The Nauru detention centre houses about 500 asylum seekers and has been criticised by the United Nations and human rights groups for harsh conditions and reports of systemic child abuse. Many staying there have self-harmed.

Last month, an Iranian man pleaded guilty to the offence of attempted suicide and was given a 12-month suspended sentence.

An activist said that a Bangladeshi refugee on Nauru who died of heart failure earlier this month had committed suicide by overdosing on pills.

Besides removing suicide and homosexuality as crimes, the new law identifies the following offences and provisions:

Mitigates the crime of murder when a mother kills her infant as a result of suffering post-natal stress.

Maintains abortion as an offence when not carried out as part of a "lawful medical procedure".

Broadens the definition of rape to apply to married and non-married couples.

Criminalises forced labour, debt bondage or serfdom, including parents or guardians who allow a child to be placed under the control of another person or force a child to marry in exchange for material benefit.

(Reporting by Alisa Tang, editing by Megan Rowling. Please credit the Thomson Reuters Foundation, the charitable arm of Thomson Reuters, that covers humanitarian news, women's rights, corruption and climate change. Visit http://news.trust.org to see more stories)

Our Standards: The Thomson Reuters Trust Principles.