Victoria Kolakowski became the first elected transgender judge in United States by defeating deputy district attorney John Creighton in a fiercely contested race for Alameda County Superior Court.

Kolakowski was voted by 51 percent of the electorate while Creighton won 48 percent of votes. The Alameda County registrar of voters said 162,082 voters supported Kolakowski's candidacy while 152,546 backed Creighton.

Kolakowski, 49, has 21 years of legal experience as an attorney with private practice and a corporate attorney and almost 5 years of experience as an administrative law judge.

Kolakowski, who transitioned from being a male to a female in 1989 during her last year in law school and had sex reassignment surgery done in 1991, had argued during the campaign that she wanted to bring professional diversity to the bench where many current judges are former prosecutors.

I believe that interacting with a transgender judge would help the other judges, court staff, police, district attorneys and the private bench to see people like me as respectable professionals and even colleagues, and not as 'freaks', she said in her website.

Creighton, 58, countered that his background as a prosecutor made him better suited for the job with more than 25 years of experience arguing cases in front of juries as a county prosecutor.

The election outcome, Kolakowski said, Monday, speaks well of our ability to look past differences and look to the things that matter: our ability and experience.

Her victory has been hailed as a milestone by transgender and gay rights groups who had lobbied hard for her victory.

Geoff Kors, executive director of Equality California, a gay rights group that assigned volunteers to call its 32,600 Alameda County members and urge them to vote for Kolakowski, said Kolakowski's victory shatters a glass ceiling.

Creighton also congratulated Kolakowski and wished her luck in her position.