Maryland's attorney general said Wednesday that the state may legally recognize same-sex marriages performed in other states.

The 45-page opinion from Attorney General Douglas F. Gansler was addressed to state Sen. Richard S. Madaleno Jr.

"You have asked whether those marriages may be recognized under state law. The answer to that question is clearly 'yes,'" Gansler wrote.

He noted that his opinion is "not itself the law of Maryland in the same sense as a statute enacted by the Legislature or court decision elaborating the common law or construing a statute." Rather, it is an interpretation of law intended to guide courts and government agencies, he said.

"Thus, what we say in this opinion is a prediction, not a prescription, as to the how the court would approach this issue under current law," Gansler wrote.

His office said that he cannot direct the actions of state agencies.

But Maryland Gov. Martin O'Malley said Wednesday afternoon that the state "will be guided by the attorney general's thorough analysis and legal advice on this matter."

He added, "I am confident that the attorney general and his office will provide all necessary advice to state agencies on how to comply with the law, and I expect all state agencies to work with the attorney general's office to ensure compliance with the law."

Further details were not immediately available, and the governor's office did not return phone calls seeking clarification.

It was unclear what the immediate ramifications of Gansler's opinion would be in Maryland.

One state representative, Del. Emmett Burns -- who sponsored a bill earlier this year that would have barred the state from recognizing same-sex marriages performed in other states and other countries -- said the attorney general's opinion "muddles the waters."

Burns' bill failed in committee.

Referring to the opinion, Burns said, "I don't think it's worth a bucket of warm spit. ... I don't think it's something that is going to make that big of a difference."

He said the issue is likely to be decided through legislation or in a court case. He noted that state Sen. Norman Stone is sponsoring a bill that mirrors Burns' failed one. Also, he said, the House Judiciary Committee is considering a bill that would allow same-sex marriage.

"It's going to be going pandemonium on the House floor" if that bill makes it out of committee, he said. He added he believes there is much opposition in both the state House and Senate to same-sex marriage.

"I believe that the concept is going to have be settled through [public] referendum," he said. "If it were to go to referendum, my side will win."

Maryland state law from 1973 says that only a marriage between a man and a woman is valid in the state. However, there are no laws or court cases regarding recognition of marriages legally performed in other places, the attorney general's office said.

Madaleno said in a statement released through Equality Maryland that the opinion is "welcome news" for same-sex couples legally married in states where the practice is allowed, and "nothing in the attorney general's opinion changes the fact that same-sex couples cannot obtain marriage licenses in Maryland."

Media reports said Madaleno had asked the attorney general in May whether Maryland may legally recognize same-sex marriages.

Massachusetts, Connecticut, Vermont and New Hampshire and Iowa allow same-sex marriage. The District of Columbia has also passed a law allowing same-sex marriage, although it has not yet taken effect.

CNN's Taylor Gandossy contributed to this report.