The retention vote in which three Iowa Supreme Court justices were ousted was illegal, according to a lawsuit seeking to keep the three justices from being tossed from the bench.

The lawsuit claims the vote violated the Iowa Constitution, which requires judicial retention votes to be held on a separate ballot.

Chief Justice Marsha Ternus and justices Michael Streit and David Baker were voted off following a campaign by groups opposed to the court's unanimous decision to legalize same-sex marriage in Iowa.

The Des Moines Register reported that the lawsuit, filed by attorneys Thomas W. George, John P. Roehrick and Carlton Salmons, asks for a temporary judicial order that would prohibit the judges from leaving the court when their terms expire at the end of December.