MEXICO CITY (AP) — A committee in Mexico’s lower house of congress on Wednesday rejected a proposal by President Enrique Pena Nieto for legalizing same-sex marriage nationwide, an idea that sparked big demonstrations by both supporters and opponents.

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.

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.

Mexico’s Supreme Court ruled last year that it was unconstitutional for states to bar same-sex marriage. But the decision did not have the effect of overturning or rewriting any laws on the books, meaning individual couples still have to sue in each case for the right to wed.

Same-sex marriage has been formally legalized only in some jurisdictions, such as Mexico City, the northern state of Coahuila and Quintana Roo state on the Caribbean coast.

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

Lawmaker Guadalupe Acosta Naranjo of the leftist Democratic Revolution Party blamed political calculations for the defeat of the measure.

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

Candido Ochoa Rojas of the Green Party, which is allied with Pena Nieto’s ruling Institutional Revolutionary Party, said he was voting against the measure due to constitutional conflicts and because marriage is governed by state civil codes.

“How will it bolster the family if the preamble says that procreation is not a decisive element of marriage?” Ochoa said.

© 2016, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.