Mexico’s congressional committee rejected a measure on Wednesday that would’ve legalized same-sex marriage throughout the country.

The measure on enshrining same-sex couples' right to wed in the constitution was defeated 19-8, with one abstention, in the Commission on Constitutional Matters.

President Enrique Pena Nieto proposed the measure back in May, sparking demonstrations from both supporters and opponents.

Commission chairman Edgar Castillo Martinez said the vote means the matter is "totally and definitively concluded," according to a summary published online by the Chamber of Deputies.

More on this...

Mexico's Supreme Court ruled last year that it was unconstitutional for states to bar same-sex marriage. The decision did not have the effect of overturning or rewriting any laws. Individual couples in Mexico still have to sue for the right to get married.

Some jurisdictions in Mexico have legalized same-sex marriage.

"A reform of which we should feel proud," Lawmaker Guadalupe Acosta Naranjo said. "Because the rights of minorities are not put to a vote. They are expanded and recognized, and it is congress that should protect them."

Pena Nieto’s party suffered setbacks during the midterm elections in June, and largely sat on the issue afterward. The measure would have codified the principles of the Supreme Court ruling in the constitution and extended the right to all of Mexico.

The Associated Press contributed to this report.