At stake in the trial was whether California's ban on same-sex marriage violates gay couples' rights to equal protection and due process, as protected by the U.S. Constitution.
The high-profile case is being watched closely by both supporters and opponents of same-sex marriage, as many say it is destined to make its way to the U.S. Supreme Court. If it does, the case could result in a landmark decision on whether people in the United States are allowed to marry people of the same sex.
Same-sex marriage is currently legal in five U.S. states and in the District of Columbia, while civil unions are permitted in New Jersey. The five states are Massachusetts, Connecticut, Vermont, Iowa and New Hampshire.
"Proposition 8 fails to advance any rational basis in singling out gay men and lesbians for denial of a marriage license. Indeed, the evidence shows Proposition 8 does nothing more than enshrine in the California Constitution the notion that opposite-sex couples are superior to same-sex couples," Walker, who was appointed to the federal bench by former President Ronald Reagan, wrote in his opinion.
"Race restrictions on marital partners were once common in most states but are now seen as archaic, shameful or even bizarre," he added. "Gender no longer forms an essential part of marriage; marriage under law is a union of equals."
In a separate order, Walker also granted supporters of Proposition 8 a temporary stay, which stops his decision from taking immediate effect. They had argued, prior to his ruling, that same-sex marriages would be performed soon after his decision and could be complicated by rulings and appeals farther down the legal road.
Walker gave both sides in the case until Friday to submit their responses to the order.