Crowds cheered on Gov.
"Life, liberty and the pursuit of happiness certainly includes the right to marry the person you love," Dayton said before signing the bill at the steps of the state Capitol in St. Paul.
The move came after the Democrat-controlled Senate passed the legislation on a 37-30 vote. Before the vote, same-sex marriage opponents protested at the Capitol. A paper tombstone on the Capitol lawn read, "RIP MARRIAGE, 2013."
Two years earlier, the Legislature put a referendum on the ballot that would have banned same-sex marriage. Minnesotans voted down the proposal in November.
Gay marriage will become legal in Minnesota on Aug. 1. However, churches are not required to perform the unions.
Minnesota is just the latest in a string of states to allow gay marriage. Delaware became the 11th state to approve such unions last week -- and Rhode Island took similar action a week before that.
Washington, Maryland and Maine voters approved same-sex marriage in November. The District of Columbia and the states of Connecticut, Iowa, Massachusetts, New Hampshire, Vermont and New York also allow gay marriage.