MEXICO CITY (Reuters) - A Mexican congressional committee on Wednesday voted to reject a bid by President Enrique Pena Nieto to legalize gay marriage in the country, marking a setback for the president and gay rights in the traditionally conservative country.

Participants wave a rainbow flag in front of a church during a march in support of gay marriage, sexual and gender diversity in Mexico City, Mexico September 11, 2016. REUTERS/Carlos Jasso

The president’s office asked Congress in May to change Mexico’s constitution to guarantee adults the right to marry without restrictions based on gender, sexual preference, or other reasons.

But, the measure was rejected by a constitutional committee in Mexico’s lower house on Wednesday with 19 votes against, 8 in favor and one abstention.

The gay marriage initiative “is considered to be totally and definitively concluded,” the lower house committee said in a statement on the vote.

The initiative could technically still move forward but its prospects look poor, said a congressional source.

The rejection was more bad news for Pena Nieto, who is grappling with discontent over a slow economy, conflict of interest scandals, drug gang violence and Donald Trump’s successful White House bid which has sent the peso into a tailspin.

Trump has made pejorative comments about Mexicans and vowed to make Mexico pay for a new wall on the border between the two countries.

Same-sex marriage is permitted in Mexico City, as well as in several states including Coahuila, Quintana Roo, Jalisco, Nayarit, Chihuahua and Sonora. Pena Nieto’s measure would have extended that right nationally.

Mexico’s Supreme Court said last year that laws restricting marriage to a man and woman were unconstitutional and a Supreme Court judge urged states to legalize gay marriage.

However, many state legislatures have not changed their statutes to comply, meaning couples must file legal challenges case by case to get married. Gay marriage is still banned under local laws in many of Mexico’s 31 states.

In September, tens of thousands of people across Mexico marched in protest against gay marriage.