Costa Rica’s Casa Presidencial (presidential office) has on Wednesday introduced a bill to legalize same-sex common-law marriages.

Common-law marriage grants all the benefits of a traditional marriage – including inheritance rights, social security and public insurance benefits and hospital visitation rights – but requires the approval of a judge after a couple has been together for at least three years.

According to the Tico Times, Bill 18.483 would amend several articles of the family code to formally recognize ‘stable’ relationships of more than three years between two people, regardless of their ‘sex, identity, sexual orientation or choice” with all the personal and property protections of legal marriage.’

A same-sex couple who fulfills the criteria could meet with a lawyer or appear before a civil judge to codify their relationship.

The move was celebrated by LGBTI advocates although the government is said to have stumbled in its execution of the measure.

The Times reported that the bill presented on Wednesday was actually the administrations second attempt this week to propose a gay common-law marriage bill after having to make a last-minute change when it realized that the bill (17.844) it had wanted to present had expired almost a year ago.

President Luis Guillermo Solís of the centre-left Citizen Action Party (PAC) was quoted as saying that his government is committed to human rights and equality for the LGBT community despite the legislative bungle.

In June, Gerald Castro, 37, and Cristian Zamora, 45, who have been together for 12 years, were granted a common-law marriage by a family court in the city of Goicoechea – a landmark decision hailed by marriage equality supporters.