James Scales, 68, was married to William Tasker, 60, on Tuesday shortly after midnight by Baltimore Mayor Stephanie Rawlings-Blake inside City Hall.
"It's just so hard to believe it's happening," Scales said shortly before marrying his partner of 35 years.
Six other same-sex couples also were being married at City Hall. Ceremonies were taking place in other parts of the state as well.
The ceremonies follow a legislative fight that pitted Gov. Martin O'Malley against leaders of his Catholic faith. Voters in the state, founded by Catholics in the 17th century, sealed the change by approving a November ballot question.
"There is no human institution more sacred than that of the one that you are about to form," Rawlings-Blake said during the brief ceremony. "True marriage, true marriage, is the dearest of all earthly relationships."
Brigitte Ronnett, who also was married, said she hopes one day to see full federal recognition of same-sex marriage. Maryland, Maine and Washington state were the first states to approve same-sex marriage by popular vote, in November, a development Ronnett said was significant.
"I think it's a great sign when you see that popular opinion is now in favor of this," said Ronnett, 51, who married Lisa Walther, 51, at City Hall.
Same-sex couples in Maryland have been able to get marriage licenses since Dec. 6, but they did not take effect until Tuesday.
In 2011, same-sex marriage legislation passed in the state Senate but stalled in the House of Delegates. O'Malley hadn't made the issue a key part of his 2011 legislative agenda, but indicated that summer that he was considering backing a measure similar to New York's law, which includes exemptions for religious organizations.
Shortly after, Archbishop Edwin O'Brien of Baltimore wrote to O'Malley that same-sex marriage went against the governor's faith.
"As advocates for the truths we are compelled to uphold, we speak with equal intensity and urgency in opposition to your promoting a goal that so deeply conflicts with your faith, not to mention the best interests of our society," wrote O'Brien, who served as archbishop of the nation's first diocese from October 2007 to August 2011.
The governor was not persuaded. He held a news conference in July 2011 to announce that he would make same-sex marriage a priority in the 2012 legislative session. He wrote back to the archbishop that "when shortcomings in our laws bring about a result that is unjust, I have a public obligation to try to change that injustice."
The measure, with exemptions for religious organizations that choose not to marry gay couples, passed the House of Delegates in February in a close vote. O'Malley signed it in March. Opponents then gathered enough signatures to put the bill to a statewide vote, and it passed with 52 percent in favor.
In total, nine states and the District of Columbia have approved same-sex marriage. The other states are Connecticut, Iowa, Massachusetts, New Hampshire, New York and Vermont.
(Copyright 2013 by The Associated Press. All Rights Reserved.)