Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A committee in Mexico's lower house of congress on Wednesday rejected a proposal by President Enrique Peña Nieto for legalizing same-sex marriage nationwide.

Peña Nieto's proposal for same-sex marriage sparked massive demonstrations by both opponents and supporters.

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.

Catholic activists march to protest against President Enrique Pena Nieto proposal to legalize same-sex marriage, in Guadalajara, Mexico, on September 10, 2016. Hector Guerrero / AFP/Getty Images

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.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

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.

RELATED: Mexicans March Against President's Proposal to Allow Same-Sex Marriage

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.

Peña 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.

RELATED: Mexico President Proposes Legalizing Same-Sex Marriage

"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 Peña 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.

Follow NBC News Latino on Facebook, Twitter and Instagram.