Democrat Liz Mathis' Tuesday win to the Iowa Senate preserves a Democratic majority and keeps a gay marriage debate at bay in the chamber.

The Des Moines Register is reporting that Mathis edged out her Republican rival, small business owner Cindy Golding, with 56 percent of the vote.

“I pledge to the voters of this district: I will go to the Capitol and fight for you every day. I will be your voice in the state Senate,” Mathis is quoted as saying.

The special election was an opportunity for Republicans to break Democrats' one-seat majority in the Senate, where Majority Leader Michael Gronstal has kept an effort to repeal the state's gay marriage from reaching the Senate floor.

Groups opposed to gay marriage, including the National Organization for Marriage (NOM) and Bob Vander Plaats' The Family Leader, had poured money into the $1 million race and had highlighted Mathis' support for the 2009 Iowa Supreme Court ruling that brought gay marriage to the Midwest, despite the fact that neither candidate had made much of the issue.

“The Future of Marriage Hangs In the Balance,” read a headline from a NOM mailer attacking Mathis for her views on the issue.

“This is a pivotal election contest in our battle to allowing the people of Iowa the opportunity to vote to restore marriage,” said NOM President Brian Brown in a statement.

A last-minute robocall that urged voters to call Mathis and ask her “which homosexual sex acts she endorses” was condemned by NOM. The group said in a statement that it was not responsible for the anonymous calls and suggested the Mathis campaign or its supporters were behind the “dirty trick.”