The Virginia Legislature disgraced itself last week, rejecting the nomination of Tracy Thorne-Begland, a widely respected prosecutor, to be the first openly gay judge on the Commonwealth bench. Mr. Thorne-Begland was the only one of 37 nominees denied appointment to district courts in the final minutes of the session.

House Republicans shamefully pandered to election-year politics dictated by the Family Foundation, an anti-gay pressure group. They contended that Mr. Thorne-Begland, who is raising two children with his male partner, could not properly uphold the State Constitution’s ban on same-sex marriage, and would let supposed pro-gay bias drive his judicial decisions.

These Republicans, of course, uttered no concerns about judicial bias in approving the nominations of a lawmaker dedicated to gun rights, or of a lifelong pro-labor nominee and 34 others identified with assorted causes.

During his decade of service as a Richmond prosecutor, Mr. Thorne-Begland has drawn community praise for his fairness and commitment to the law. His courage is undeniable. Twenty years ago when he was serving as a Navy fighter pilot he told a television interviewer that he was a gay man, drawing an honorable discharge.