The ruling by U.S. Magistrate Judge Candy Dale, was the latest in a string of decisions by federal judges against state bans on same-sex matrimony that, if upheld by higher courts, would sharply broaden access to marriage for U.S. gay couples.
Dale said her decision would go into effect on Friday at 9 a.m. local time, unless put on hold by a higher court.
Idaho Governor C.L. "Butch" Otter vowed to appeal, arguing that Idaho voters had in 2006 "exercised their fundamental right" by approving an amendment to the state constitution defining marriage as the union of a man and a woman.
"Today's decision, while disappointing, is a small setback in a long-term battle that will end at the U.S. Supreme Court," Otter said in a statement.
An attorney for the four lesbian couples who challenged Idaho's gay marriage ban said his clients and their children "are thrilled."
"This decision means so much to them and to other same-sex couples and families across the state, who have waited for decades to be treated as equal citizens," said Shannon Minter, legal director of the National Center for Lesbian Rights in San Francisco.
Marriage rights have been extended to gay couples in 17 states and the District of Columbia in a trend that has gained momentum since the U.S. Supreme Court ruled last June that legally married same-sex couples nationwide are eligible for federal benefits.
That decision, which struck down part of the 1996 federal Defense of Marriage Act, has been cited by a number of federal judges in subsequent opinions overturning state bans on gay matrimony.