Financed largely by out-of-state organizations opposed to gay marriage, those pushing against the judges were successful in turning the vote into a referendum on the divisive issue.

“I think it will send a message across the country that the power resides with the people,” Bob Vander Plaats, a Republican who led the campaign after losing the Republican nomination for governor, told a crowd of cheering supporters at an election night party peppered with red signs declaring “No Activist Judges.” “It’s we the people, not we the courts.”

Though the Iowa election was the most prominent, similar ouster campaigns were begun in other states against state supreme court justices running unopposed in retention elections — judges whose rulings on matters involving abortion, taxes, tort reform and health care had upset conservatives.

Together they marked the rapid politicization of judicial races that had been specifically designed to be free of intrigue. Over the last decade, just $2 million was spent on advertising in retention elections, less than 1 percent of total campaign spending on judicial elections in that period, according to data compiled in a recent report released in part by the Brennan Center for Justice at New York University Law School. More than $3 million was spent on retention election races this year, easily eclipsing the figure for the previous decade, according to the Brennan Center.