The bill passed in the House after more than three hours of debate that was emotional at times but remained respectful throughout.

Supporters already are celebrating the Minnesota House's passage of a measure to legalize gay marriage, but there are a few more steps before it gets to Gov. Mark Dayton's desk.

"It's not time to uncork the champagne yet. But it's chilling," Rep. Steve Simon, DFL-Hopkins, said at a spirited rally in the Capitol rotunda a few minutes after the House voted 75-59 to let same-sex couples start getting married in Minnesota come Aug. 1.

The state Senate is scheduled to vote on the bill Monday, and leaders expect it to pass there too. Dayton has pledged to sign it into law, and a spokesman said the Democratic governor likely would do so at a Tuesday ceremony.

Final passage would make Minnesota the 12th state in the country to allow gay couples to wed, and the first in the Midwest to pass such a law in its Legislature. It comes just six months after the state's voters rejected banning gay marriage in the state constitution.

The bill passed in the House after more than three hours of debate that was emotional at times but remained respectful throughout. Many hundreds of demonstrators on both sides of the issue chanted, sang and waved signs outside the House chamber, prompting heightened security at the Capitol. But no disruptions were reported.

Rep. Karen Clark, the bill's sponsor, said her only goal was equal treatment under state law for same-sex couples. In a deeply personal speech, the Minneapolis Democrat talked of the support she got from her own family after coming out as gay decades ago.

"My family knew firsthand that same-sex couples pay our taxes, we vote, we serve in the military, we take care of our kids and our elders and we run businesses in Minnesota," Clark said.

Four of the House's 61 Republicans voted for the bill, while two of its 73 Democrats voted no. None of the four Republicans committed support beforehand. One, Rep. Jenifer Loon of Eden Prairie, said she made up her mind during the debate, in which lawmakers listened with rapt attention while their colleagues spoke.

"There comes a time when you just have to set politics aside and decide in your gut what is the right thing to do," said Loon, whose suburban district southwest of Minneapolis voted strongly against last fall's gay marriage ban. The other Republicans to vote for gay marriage also hail from suburban or exurban districts: Pat Garofalo of Farmington, David FitzSimmons of Albertville and Andrea Kieffer of Woodbury.

Opponents argued the legislation alters a centuries-old conception of marriage, and leaves those people opposed for religious reasons to be tarred as bigots.

"We're not. We're not," said Rep. Kelby Woodard, a Republican from Belle Plaine. "These are people with deeply held beliefs, including myself."

House Republican Leader Kurt Daudt acknowledged views on gay marriage are changing but said the bill's sponsors stood to alienate thousands of Minnesotans who still believe in the male-female definition of marriage.

"Hearts and minds are changing on this," Daudt said. "But Minnesotans are still divided."

The two Democrats who voted no, Patti Fritz of Faribault and Mary Sawatzky of Willmar, represent largely rural districts where the gay marriage ban was backed by a majority of voters. But most of the Democrats from rural, more socially conservative areas ended up voting for the bill.

Outside the chamber, supporters and opponents of the bill stood shoulder to shoulder and chanted with equal vigor. Gay marriage backers dressed in orange T-Shirts and held signs that read, "I Support The Freedom to Marry." Behind them, opponents held up bright pink signs that simply read, "Vote No."

Among the demonstrators was Grace McBride, 27, a nurse from St. Paul. She said she and her partner felt compelled to be there to watch history unfold. She said she hopes to get married "as soon as I can" if the bill becomes law. The legislation would allow her to do so starting Aug. 1.

"I have thought about my wedding since I was a little girl," she said.

On the other side of the divide, Galina Komar, a recent Ukrainian immigrant who lives in Bloomington, brought her 4-year-old daughter and 1-year-old son to the Capitol to express her religious concerns.

"I do believe in God, and I believe God already created the perfect way to have a family," Komar said.

Eleven other states allow gay marriages — including Rhode Island and Delaware, which approved laws in the past week.

Iowa allows gay marriages because of a 2009 court ruling. Leaders in Illinois — the only Midwestern state other than Minnesota with a Democratic-led statehouse — say that state is close to having the votes to approve a law too.

More than two dozen House Democrats gave speeches for the bill, many sharing personal stories of gay friends and family members.

"There are kids being raised by grandparents, single parents, two moms or two dads," said Rep. Laurie Halverson, a Democrat from a suburb south of St. Paul. "Some of those folks are my friends. And we talk about the same things as parents. We talk about large piles of laundry, and how much it hurts to step on a Lego. That's what we do, because we're all families."