A new national report finds more than $833,000 was spent on Iowa’s “politically charged” 2012 judicial retention election.

In 2010 three justices were voted off the Iowa Supreme Court, a backlash over the court’s 2009 ruling that legalized same-sex marriage in Iowa. Justice David Wiggins — another justice who joined that unanimous 2009 ruling — was on the 2012 General Election ballot in a retention election and he survived. The report from The National Institute on Money in State Politics, The Brennan Center for Justice at New York University School of Law and a group called Justice at Stake tracked spending on the race. They found opponents of Wiggins spent $466,000 arguing for his defeat. Wiggins supporters spent about $100,000 less than that.

Iowans for Freedom — headed by well-known Iowa conservative Bob Vander Plaats — spent $318,000 trying to defeat Wiggins according to the report. The National Organization for Marriage spent more than $130,000 on TV ads against Wiggins. The “Justice Not Politics” organization that supported Wiggins spent $322,000. More than a third of that money came from The Human Rights Campaign, an organization that supports gay rights.

Wiggins won retention with 54.5 percent of the vote. The three other justices who joined the court’s same-sex marriage ruling are up for a retention vote in 2016. That includes Justice Mark Cady, the author of the 2009 same-sex marriage ruling. He became the court’s chief justice in 2011 after voters tossed former Chief Justice Marsha Ternus off the court.