Uruguay is expected to debate legislation which would legalize gay marriage before the end of the year.

Paul Maqueira of the Ministry of Education and Culture (MEC) told El Pais that an initial draft of the measure had already been prepared.

“The idea is to promote a marriage equality project so that gay couples have equal access to marriage as heterosexuals,” he said.

Maqueira declined to say when the proposal might reach lawmakers but said he felt this would happen “before the end of the year.”

The move comes a week after a court in Uruguay for the first time recognized the legal marriage of a gay couple.

Judge Eduardo Martinez recognized on appeal the legality of a marriage entered into in Spain, where Socialists legalized marriage equality in 2005.

The binational couple lives in both Uruguay and Spain.

Currently, Uruguay recognizes gay and lesbian couples with civil unions. After a couple has lived in a “stable relationship” for 5 years they may petition the government for recognition.

If approved, Uruguay would become only the second South American country after Argentina to legalize marriage equality.