The Virginia General Assembly on Tuesday appointed a gay Richmond prosecutor to a judgeship a year after rejecting him because of his sexual orientation.

Tracy Thorne-Begland, a deputy commonwealth attorney and former Navy officer who came out on national television in 1992 while serving, will serve a six-year term on the 13th General District Court.

But his nomination was not without resistance. The House voted 66-28 to approve Thorne-Begland -- the only judicial nominee to garner significant opposition -- and he passed in the Senate with the support of 28 senators. A dozen Senate Republicans abstained on the vote in protest.

Still, it's a significant reversal for House Republicans, who last year blocked Thorne-Begland's appointment, citing his gay rights activism and his honorable discharge from the military after divulging his homosexuality on national television at a time when gays were not allowed to serve openly in the military. About half of the House's Republican majority voted for Thorne-Begland this time around.

A month after the General Assembly rejected Thorne-Begland last year, the Richmond Circuit Court appointed him to serve on the bench on a temporary basis. The court has the authority to appoint judges when legislators are not in session.

As an incumbent judge, Thorne-Begland received high praise from his peers, making the path to appointment easier the second time around.

Democrats celebrated Thorne-Begland's victory as a victory for gay rights.

Sen. Mark Herring, a Loudoun County Democrat running for attorney general, chastised his potential Republican opponents, Del. Rob Bell and Sen. Mark Obenshain, for voting against Thorne-Begland.

Herring said Bell and Obenshain "bowed to extremists in their party and refused to vote to confirm a highly qualified prosecutor and veteran simply because of his sexual orientation."

Del. Bob Marshall, R-Manassas, who led the opposition to Thorne-Begland last year and voted against him again on Tuesday, said Republicans are overreacting to last November's election, when the GOP suffered badly at the polls.

"What the hell has happened to the Republican Party?" Marshall said. "These Republican leaders are being led around by timid and fearful Republican consultants who want nothing to do with social issues. You cannot afford to abandon your base. Republicans did this today with their vote."