The Maryland Democrat signed the bill Thursday, a week after its final passage in the Legislature. According to the Associated Press, the new law is set to take effect in January 2013.
Opponents, however, are expected to petition the law to a referendum on the November ballot.
"More so than equal rights, more so than fairness, more so than justice or injustice, the word that allowed us to move forward was really dignity: The dignity of every home, the dignity of a job, the dignity of work, the dignity of every family, the dignity of every individual," O'Malley was quoted as saying. "When we succeed, if this goes to a referendum, I believe it will be because of that evolution of the public discourse."
AP reports referendum organizers will need to collect almost 56,000 signatures to put the measure before voters and are expected to rely heavily on churchgoers to achieve that goal. Some pastors in predominantly black churches have begun using their sermons to push the referendum.
The Associated Press contributed to this report.