In Iowa, the campaign has taken a national flavor with visiting Republican presidential hopefuls endorsing the removal effort and Sandra Day O’Connor, the former United States Supreme Court justice, urging the state to resist the national tug toward partisanship.

A half-century of judicial elections in Iowa could be cumulatively read either as a popular endorsement of a well-functioning judiciary or as a testament to voter apathy. Typically in Iowa, more than a third of people who go to the polls do not even cast votes in the judicial races. No sitting State Supreme Court justice has ever been defeated, and only four lower court judges were removed in nearly 50 years.

Conservatives and liberals believe that insulation from voters has allowed judges to rule independently of popular opinion. That belief is why national organizations have poured money into the ouster campaign in Iowa and why the effort is causing worry among advocates for same-sex marriage and for an independent judiciary. Same-sex marriage has been initially approved in four states by supreme courts and in three (and the District of Columbia) by legislatures.

Troy Price, political director for One Iowa, a gay rights group, said Iowans would not have voted for same-sex marriage and would likely reject it today. “Our concern is the message it sends to judges around the country that if you have a case like ours come before you, you could very well lose your jobs over it,” Mr. Price said. “This is an effort to intimidate the courts in Iowa and intimidate courts all across the country.”

Brian S. Brown, executive director of the National Organization for Marriage, which has spent $230,000 on television ads criticizing the Iowa judges, said he understood that removing the three judges would not change the same-sex marriage ruling. (It was a unanimous ruling by the state’s seven justices.) But Mr. Brown said he hoped the judges’ ouster would help prevent similar rulings elsewhere by making judges around the nation aware that their jobs are on the line.

“It sends a powerful message,” he said, “That if justices go outside the bounds of their oaths, if the justices go outside the bounds of the U.S. and state constitutions they’re going to be held accountable.”