Santa Fe has elected its first ever openly gay mayor, Javier Gonzales.

Gonzales, who faced off against two opponents, managed a clear victory, with 43 percent of the vote.

He beat City Councillor Patti Bushee, who is also openly gay and got 28.7 percent of the vote, and Bill Dimas, who got 28 percent.

According to the Albuquerque Journal, Gonzales is the former chairman of the New Mexico Democratic party, has two daughters, and is the first openly gay mayor to be elected in the New Mexico state capital.

His father, George Gonzales, was mayor of the city from 1968 to 1972.

At his victory party, the newly elected mayor said: “I stand before you humbled. I stand you before standing on the shoulders of people like [outgoing Mayor David] Coss and my father and so many who have been before in this position to say that I am ready to accept the responsibility and the honour of being your mayor.”

“I certainly want to express my commitment to working with councillors Dimas and Bushee.”

New Mexico became the 17th US state to legalise same-sex marriage in December last year, when the Supreme Court declared denying marriage rights unconstitutional.