A restaurant displays a poster supporting the Yes vote, in the Caple Street area of Dublin in Ireland May 18, 2015. Irish voters approved gay marriage in May. Now, lawmakers are tackling transgender rights. Reuters

Irish transgender people may soon be able to determine their legal gender without any involvement from the medical community or government. Ireland would be the fourth country in the world to adopt this approach.

Lawmakers passed the gender recognition bill Wednesday, and the president is expected to sign the bill into law by the end of the month, reports the Guardian. The progressive legislation would base gender entirely on self-determination.

“I am so proud of my country. This legislation is something that will make an enormous difference to my life. So many times in my life, I have felt like I had to ask for permission to exist, but that will no longer be the case," Ben Power, an Irish citizen, told UTV Ireland.

The bill was brought about following a winning case involving Dr. Lydia Foy, a transgender woman. Despite undergoing surgery, she had been unable to identify herself as a woman in official documentation.

"This is a historic moment for the trans community in Ireland," Sara Phillips, the chair of TransgenderEquality Network Ireland, told the Guardian. "Trans people should be the experts of our own gender identity. Self-determination is at the core of our human rights.”

Most European countries require that transgender people undergo surgery, be diagnosed with a mental illness or get divorced if they are married in order to legally change their gender.

“This legislation puts Ireland in the small vanguard of countries that provide true equality to their transgender citizens and residents," said Mark Kelly, the executive director of the Irish Council for Civil Liberties. "The passage of the legislation is a testament to the years of dogged campaigning by the trans community and its allies, and particularly to the leadership of Lydia Foy, who first laid down the challenge to the Irish state to treat its trans citizens with dignity."

The bill speaks to an ongoing shift in Ireland, which did not decriminalize homosexuality until the 1990s, but in May passed a referendum to allow same-sex marriage through popular vote.

"The world is moving on and Ireland is taking the lead," Martin McGuinness, the deputy first minister, told CNN after Ireland voted in favor of gay marriage.