Former state lawmaker Jackie Biskupski has won Salt Lake City's mayoral race, becoming the first openly gay person to hold the post.

Official election results released Tuesday show Biskupski defeated two-term incumbent Ralph Becker, who has served since 2007.

The victory by Biskupski marked a milestone for LGBT people in Utah who have made major strides in recent years.

However, that progress was temporarily marred last week when a judge ordered a foster child to be removed from a lesbian couple and placed with a heterosexual couple. The judge cited the well-being of the child as the reason for his order.

The ruling set off a firestorm around the state and nation. The judge quickly reversed his decision and took himself off the case.

Days earlier, the Salt Lake City-based Mormon church issued new rules targeting gay members and their children, prompting widespread backlash.

The new policy bans baptisms for children of gay parents until the kids turn 18 and disavow same-sex relationships.

Biskupski is not a member of The Church of Jesus Christ of Latter-day Saints and said she hopes the faith reconsiders the policy. She told The Salt Lake Tribune that one of her first goals as mayor would be to meet with church leaders and discuss the policy.

The church and the LGBT community have "come so far in the last year to bridge the gaps between us, that this new policy feels confusing to many," she said in a statement.

Earlier this year, the church endorsed a statewide anti-discrimination law that protected gay and transgender people from discrimination in housing and the workplace.

It's a contrast from 1998, when Biskupski was elected and became Utah's first openly gay lawmaker. She recalled that some of her colleagues in the heavily Mormon and conservative Legislature wouldn't shake her hand.

LGBT issues didn't define the tight race between Biskupski and Becker.

Salt Lake City is a liberal island in the state where no Republican has been elected mayor in four decades. Gay rights group Equality Utah endorsed both Becker and Biskupski.

Becker has been called an ally of the LGBT community, helping pass a 2009 city anti-discrimination ordinance. He also officiated dozens of the first gay marriages in 2013 in the hours after a surprising ruling overturned Utah's same sex marriage ban.

Becker, 63, was hoping to win a third term as mayor but came out of election night 1,450 votes behind Biskupski. With just 5,000 votes left to be counted in recent days, Becker did not concede.

State law has prohibited any updated vote tallies until the official vote canvass is released Tuesday.

Salt Lake City voters also appear to have elected Derek Kitchen, who would be a second gay member of the City Council.

He and his husband, Moudi Sbeity, were one of three couples who sued to overturn the state's same-sex marriage ban. Kitchen has declared victory in his council race, but the result won't be official until Tuesday.