“It gives you nightmares for years afterwards,” Judge Baissus said of the test, which is open to people who already have a law degree, and the oral examinations that followed it. In some years, as few as 5 percent of the applicants survive. “You come out of this completely shattered,” Judge Baissus said.

The question of how best to select judges has baffled lawyers and political scientists for centuries, but in the United States most states have made their choice in favor of popular election. The tradition goes back to Jacksonian populism, and supporters say it has the advantage of making judges accountable to the will of the people. A judge who makes a series of unpopular decisions can be challenged in an election and removed from the bench.

“If you want judges to be responsive to public opinion, then having elected judges is the way to do that,” said Sean Parnell, the president of the Center for Competitive Politics, an advocacy group that opposes most campaign finance regulation.

Nationwide, 87 percent of all state court judges face elections, and 39 states elect at least some of their judges, according to the National Center for State Courts.

In the rest of the world, the usual selection methods emphasize technical skill and insulate judges from the popular will, tilting in the direction of independence. The most common methods of judicial selection abroad are appointment by an executive branch official, which is how federal judges in the United States are chosen, and a sort of civil service made up of career professionals.