With deafening cheers and overwhelming emotion, the Minnesota Senate voted 37-30 to legalize same-sex marriage.

“Today, love wins,” said Sen. Tony Lourey, DFL-Kerrick.

The vote, on the heels of a vote last week in the House, brings to a close a decade of debate over marriage that has echoed through the Capitol, bringing thousands of friends and foes of gay marriage to its marbled dome to express their deeply held feelings.

The measure next moves to Gov. Mark Dayton, who will welcome it with his signature in a celebratory ceremony at 5 p.m. Tuesday on the south steps of the Capitol.

Once it is signed, Minnesota will become the twelfth state to legalize same sex-marriage.

"It's historic and I can never be so proud of this body and of Minnesotans," said Sen. Jeff Hayden, DFL-Minneapolis. On the Senate floor, Hayden said that his wife is white and noted that just 50 years ago, his loving relationship would have been barred.

Three Democrats – Sens. LeRoy Stumpf, Dan Sparks and Lyle Koenen – voted against the bill. One Republican, Sen. Branden Petersen, voted yes.

Up until the last moments, some opponents had hoped the bill would fail despite clear indications that it would head to the Dayton’s desk.

Sen. Dan Hall, R-Burnsville, said up until the last he was praying for a miracle and the Senate to reject the bill.

“Some people have said that they are concerned about being on the right side of history. I am more concerned about being on the right side of eternity,” said Hall.

A few opponents of the bill dotted the Capitol holding signs that read 'Don't Erase Moms and Dads’ or gathered in a quiet spot to watch the debate unfold.

"In my heart, I grieve on both sides. Because I know what it's like to be alone and I know what it is like to have somebody close to you and love you. But I grieve inside because I feel we are opening the doors to Sodom and Gomorra. And in the end, God is going to be the judge," said Nelson, of Blaine, tears running down her cheeks.

On the Senate floor, Senators began with a discussion of what kinds of organizations would be protected from punishment if they refuse to involve themselves with same-sex marriage.

The measure being voted upon gives religious organizations protections, but Sen. Warren Limmer said those protections are limited.

“It doesn’t go far enough,” said Limmer, R-Maple Grove.

He said students, teachers, private business and colleges could be punished.

But backers of the legalization measure countered that Minnesota already has a human rights law that bars discrimination based on sexual orientation and that does not change if the marriage law changes.

“That’s true today, that will be true tomorrow,” said Sen. Scott Dibble, DFL-Minneapolis and the sponsor of the marriage bill.

After long debate, the Senate voted down adding a measure to the marriage bill that backers said would offer religious opponents greater protections and opponents said would “gut” the state’s Human Rights act. The Human Rights Act forbids discrimination against people based on their sexual orientation. That measure failed on a 26-41 vote.

Opponents of the bill have repeatedly said that Minnesotans were lied to last year during the campaign against the constitutional amendment that would have banned same-sex marriage. They were told, they claimed, that nothing would change if the amendment didn’t pass.

“Do they feel betrayed today? Absolutely. Do they feel lied to? Yeah,” said Sen. Mary Kiffmeyer, R-Big Lake.

Those who campaigned hard against the constitutional ban deny that they claimed they would never try to legalize same-sex marriage.

Opponents of legalization were vastly outnumbered by supporters in the Capitol on Monday, as they were in the Senate chambers.

In droves, they welcomed lawmakers to the Capitol with hearts pasted on the august building’s stone steps, sang songs, banged drums and created echoes in the marble halls as lawmakers on their side spoke.

“We have nothing to fear from love and commitment,” said Sen. John Hoffman, DFL-Champlin, setting off an echo of praise.

But some Senate members may have something to fear.

Last year, although Minnesota as a state opposed the constitutional amendment to ban same-sex marriage, many districts supported it. Although the vote on the amendment is not a perfect indicator of support, or lack thereof, for same same-sex marriage, those districts’ votes weighed heavy on the minds of lawmakers.

Those districts include the Andover district that Sen. Brenden Petersen represents. A Republican, his district voted to define marriage as the union of one man and one woman to the constitution.

He is a co-sponsor of the law to legalize same sex marriage and was the first legislative Republican to publicly declare his support.

In the final debate, he sent this message to his children: “Be bold and be courageous and you will never regret a day in your life."

He said that he is more uncertain of his future than he has been, but that he is confident that he was standing on the side of liberty.

Some Democrats faced similar conflicts. Sen. Vicki Jensen, DFL-Owatonna, comes from a district that voted for the marriage amendment and she voted yes.

Rep. Joe Radinovich, DFL-Crosby, has been there. Last Thursday, he voted for the bill. Sixty-two percent of his district voted to constitutionally ban same-sex marriage. He announced his vote publicly the week before he took it.

He said he has heard from passionate people on both sides.

“Criticism is a natural part of this,” Radinovich said afterward. But even in his outstate district, feelings are evolving.

“You can see public opinion changing on the ground up there,” he said.

By the time he runs for re-election in 2014, he and all Minnesotans will have a chance to see how same-sex marriage has changed the state. After Dayton’s signature, it will be legal on August 1.

Click here for an interactive graphic of the House and Senate votes that sent the measure to the governor's desk.

Baird Helgeson contributed to this post.

Here's the vote: