Marsha Ternus was chief justice of the Iowa Supreme Court before the court’s unanimous ruling that legalized same-sex marriage in that state.

She told a Gainesville audience Monday that special interest groups spent more than $1 million to oust her and two other justices in a 2010 retention election.

She warned against turning judges into “theologians in robes” who based rulings on Biblical guidance or “politicians in robes” who based rulings on campaign contributions or polls.

“If the day comes that judges make decisions as politicians or theologians, this society and our democracy are in serious trouble,” she said.

She spoke before about 80 people at the Paramount Plaza Hotel in a speech sponsored by the Florida Free Speech Forum and the University of Florida’s Bob Graham Center for Public Service.

Ternus spent 17 years on the Iowa Supreme Court before she was voted out. The previous year, the court ruled that prohibiting same-sex marriage violated the Iowa Constitution.

She said that special interest groups from outside the state were behind the campaign to oust her and the two other justices. The campaign’s goal was intimidating judges in other states to not follow Iowa’s lead, she said.

About 20 states hold periodic retention elections in which judges are removed if a majority of voters cast ballots against them. Nearly $5 million was spent in Iowa and judicial retention elections in three other states in 2010, Ternus said.

“In that single year, the spending in these four retention elections more than doubled the total spent in the entire preceding decade for all retention elections nationwide,” she said. Read More