“It’s about a pattern of behavior that is just notorious for homosexual advocacy,” Mr. Marshall said. He added that Mr. Thorne-Begland had misrepresented himself on his application for military service, joining the Navy despite the ban on homosexuals in service. “The fact that he defied his oath and could not have been candid on the application — that’s highly problematic, and it stays with you,” Mr. Marshall said.

Mr. Thorne-Begland, who is raising twins with his partner, according to a biography that he provided, tried to allay concerns about impartiality, saying in a letter sent to Delegate David B. Albo, a Republican who is the chairman of the House Courts of Justice Committee, that if confirmed as District Court judge, he would “neutrally apply the laws.” He also pledged to stay out of politics and public discourse.

Gov. Bob McDonnell, a Republican, weighed in on the debate Tuesday, sending out a statement that implicitly condemned the vote, saying judicial candidates “must be considered based solely on their merit, record, aptitude and skill.”

The statement also said Mr. McDonnell had “long made clear that discrimination on the basis of sexual orientation is not acceptable in state government,” an assertion that his Democratic opponents say contradicts his own record. When he was a state legislator, Mr. McDonnell was head of the committee that held hours of hearings and ultimately torpedoed the candidacy of a lesbian judge, Verbena Askew, whose sexual orientation was a central part of the debate.

Virginia is one of more than 30 states with a ban on same-sex marriage, and gay advocacy groups say the state’s record on civil liberties for gays and lesbians is spotty. House Republicans have twice blocked a bill that would protect state employees from discrimination by sexual orientation, according to James Parrish, executive director of Equality Virginia. The group issued a statement condemning Tuesday’s vote, saying it was the result of pressure by the Family Foundation.

“We are on the wrong side of history on this one,” said State Senator Donald McEachin, a Democrat, who supported Mr. Thorne-Begland’s candidacy and criticized the Republican leadership of the Senate for not putting his nomination up for a vote, after the House rejected him.

Mr. Thorne-Begland was being considered for a judgeship on the General District Court in Richmond, where he currently serves as a prosecutor. In a statement on Tuesday, he said only that he was “looking forward to continuing to serve the citizens of the city of Richmond and the great commonwealth of Virginia.”