A law has been passed in Ireland that will allow transgender people to change their legal gender with no medical or state intervention.

The Gender Recognition Bill was passed late on Wednesday and is set to be signed into law by the end of July, Reuters reports.

Ireland will be the third European nation, after Denmark and Malto, to allow transgender people aged over 18 to change their legal gender without intervention. The majority of countries in Europe require transgender people to undergo surgery and sterilization, be diagnosed with a mental disorder and get divorced if married in order to have their desired gender legally recognized.

"This legislation marks an incredible shift in Irish society... this is a historic moment for the trans community in Ireland," said Transgender Equality Network Ireland (TENI) chairwoman Sara Phillips.

"Trans people should be the experts of our own gender identity. Self-determination is at the core of our human rights," Phillips said in a statement.

While campaigners welcome the new law, they have also expressed concern at the restrictions for transgender people aged between 16 and 18, who will require medical observation, parental consent and a court order, and the lack of legal provision for those under 16.

"A considerable part of the trans community remains excluded. Minors, intersex people and those with a non-binary identity deserve recognition too," said Richard Köhler, senior policy officer at human rights organization Transgender Europe.

There are an estimated 1.5 million people across Europe who are transgender, according to Amnesty International.