"The court reaffirmed that a statute inconsistent with the Iowa constitution must be declared void even though it may be supported by strong and deep-seated traditional beliefs and popular opinion," said a summary of the ruling issued by the court.
The ruling set off celebration among the state's gay-marriage proponents.
"Iowa is about justice, and that's what happened here today," said Laura Fefchak, who was hosting a verdict party in the Des Moines suburb of Urbandale with partner of 13 years, Nancy Robinson.
Robinson added: "To tell the truth, I didn't think I'd see this day."
Richard Socarides, an attorney and former senior adviser on gay rights to President Clinton, said the ruling carries extra significance coming from Iowa.
"It's a big win because, coming from Iowa, it represents the mainstreaming of gay marriage. And it shows that despite attempts stop gay marriage through right wing ballot initiatives, like in California, the courts will continue to support the case for equal rights for gays," he said.
Court rules dictate that the decision will take about 21 days to be considered final, and a request for a rehearing could be filed within that period. That means it will be at least several weeks before gay and lesbian couples can seek marriage licenses.
Polk County Attorney John Sarcone said the county attorney's office will not ask for a rehearing, meaning the court's decision should take effect after that three-week period.
The case has been working its way through Iowa's court system since 2005 when Lambda Legal, a New York-based gay rights organization, filed a lawsuit on behalf of six gay and lesbian Iowa couples who were denied marriage licenses. Some of their children are also listed as plaintiffs.
The suit named then-Polk County recorder and registrar Timothy Brien.
The state Supreme Court's ruling upheld an August 2007 decision by Polk County District Court Judge Robert Hanson, who found that a state law allowing marriage only between a man and a woman violates the constitutional rights of equal protection.
The Polk County attorney's office, arguing on behalf of Brien, claimed that Hanson's ruling violates the separation of powers and said the issue should be left to the Legislature.
Lambda Legal scheduled a news conference for early Friday to comment on the ruling. A request for comment from the Polk County attorney's office wasn't immediately returned.
Around the nation, only Massachusetts and Connecticut permit same-sex marriage. California, which briefly allowed gay marriage before a voter initiative in November repealed it, allows domestic partnerships.
New Jersey and New Hampshire also offer civil unions, which provide many of the same rights that come with marriage. New York recognizes same-sex marriages performed elsewhere, and legislators there and in New Jersey are weighing whether to offer marriage. A bill that would legalize same-sex marriage in Vermont has cleared the Legislature but may be vetoed by the governor.
The ruling in Iowa's same-sex marriage case came more quickly than many observers had anticipated, with some speculating after oral arguments that it could take a year or more for a decision.