MEXICO CITY — Mexico’s first openly gay elected mayor is set to take office in a rough part of Zacatecas state known for cowboy boots, embossed belts and drug gang shootouts.

Benjamin Medrano, a 47-year-old singer and gay bar-owner, says he is proud to be openly gay and rights groups say his victory in the city of Fresnillo’s July 7 election marks a significant point in the fight for gay rights.

They add that it is too early yet to declare victory and Medrano, who takes office in September, acknowledges that he was the target of a malicious phone-calling campaign in which his political rivals “tried to smear me, as if being gay were a crime.”

Zacatecas is a largely rural state with a reputation for cowboy hats and macho swagger, one of last places in Mexico that seemed likely to elect a gay mayor.

“Somewhat? Very machisto, I would say,” Medrano says of his region. “I am going to be mayor of a township (roughly equivalent to a U.S. county) where there are 258 villages full of tough country people, who don’t necessarily have much information on what’s happening elsewhere, and have even less of an automatic sympathy with their gay mayor.”

“But,” he notes,” It’s not like I’m going to paint city hall pink, either.”

While some top Mexican legislators and mayors have been rumored to be gay, none has ever come out.

“He is the first,” said Alejandro Brito, director of “Letra S,” one of Mexico’s foremost gay rights groups. “There have been city officials and city council members, but openly gay mayors? No.”

He noted some gay legislators have won seats in congress, but not by winning any district race; rather, they won their seats through a proportional-representation scheme in which political parties designate them.

“This shows that our human rights system is providing some protection,” Brito said. “Because, even though there is no public majority in favor of electing gay politicians, he (Medrano) knows that the legal framework will protect him.”

“It is now more risky for a political rival to be openly homophobic, than it is to be a homosexual candidate,” Brito said.

In recent years, a drug turf war has raged around Fresnillo, and bodies have been found hacked to bits, others with their throats slit, some decapitated, some stuffed in wells or shallow graves. Medrano campaigned on a strong public-safety platform, advocating cooperation with state and federal police, and vetting and background checks on the notoriously corrupt local police force.

“I’m not at risk, because I don’t have any relationship with any of the groups,” Medrano said Thursday, referring to the two drug cartels – the Zetas and the Gulf Cartel – that are fighting for control of Fresnillo, a city of 230,000 that has the misfortune to sit on some of the main trafficking routes in northern Mexico.

“Of course, I have the same fear that anybody who lives in Fresnillo has,” Medrano said.

Several factors help explain his victory in this machista region.

First is that Medrano is a singer, and the owner of a gay bar for 18 years. Singing is one of the areas where Mexico has readily accepted gays.

“Given that I’m a singer, people know that aspect of me,” Medrano said.

The other factor is the way Medrano handles the political aspects of gay issues.

He has attended gay rights marches, but he doesn’t campaign on gay rights, and in fact doesn’t agree with many of the movement’s main demands.

A Roman Catholic, he says “I wish the church had a different view, but I cannot go against doctrine … I respect my church, and I don’t want to dig any deeper beyond what’s permitted and what is appropriate.”

“I’m not in favor of gay marriage, I don’t share that view, because we are still very small town … in short, we’re not prepared, in my view,” he said. “Not yet, anyway, because we have strong roots in our religion, and in our customs.”

But he criticizes gay politicians who refuse to come out, saying he’s “very proud to be the first openly gay mayor in this country.”

© 2013, Associated Press, All Rights Reserved.

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