Updated

A pivotal vote Thursday in the Minnesota House positioned that state to become the 12th in the country to allow gay marriages and the first in the Midwest to pass such a law out of its Legislature.

The 75-59 vote was seen as the critical step for the measure, which would allow same-sex weddings beginning Aug. 1. It's a startling shift in the state, where just six months earlier voters surprisingly turned back an effort to ban them in the Minnesota Constitution.

The state Senate is expected to consider the bill Monday, and leaders expect it to pass there. Gov. Mark Dayton has pledged to sign it into law.

Hundreds of people on both sides of the issue rallied Thursday at the Minnesota Capitol, which was under tighter than usual security. Pro-marriage demonstrators filled the hallways outside the House chambers, some dressed in orange T-Shirts and holding signs that read, "I Support The Freedom to Marry." Behind them, opponents held up bright pink signs that simply read, "Vote No."

Eleven other states allow gay marriages -- including Rhode Island and Delaware, which approved laws in the past week. Minnesota would be the first state in the Midwest to pass the measure out of the Legislature.

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. But most other states surrounding Minnesota have constitutional bans against same-sex weddings, so the change might not spread to the nation's heartland nearly as quickly as it has on the coasts and in New England.

The Minnesota push for gay marriage grew out of last fall's successful campaign to defeat a constitutional amendment that would have banned it. Minnesota became the first state to turn back such an amendment after more than two dozen states had passed one over more than a decade.

The same election put Democrats in full control of state government for the first time in more than two decades, a perfect scenario for gay marriage supporters to swiftly pursue legalization. They tapped the cross-section of citizens, businesses, churches and others who spoke out against the amendment and staged rallies as part of a lobbying effort to build support.

The bill cleared committees in both chambers in March, and with a succession of national polls showing opposition to gay marriage falling away nationally.