Maryland Gov. Martin O'Malley (D) speaks at a news conference in Baltimore this month urging passage of the same-sex marriage ballot measure. (AP Photo/Patrick Semansky)

A legal hurdle was removed Thursday for gay couples hoping to wed in Maryland at the stroke of midnight Jan. 1., the day the state’s new same-sex marriage law takes effect.

In a lengthy opinion, the state attorney general’s office said it is permissible for clerks of county courts to start processing marriage licenses a few days ahead of time to facilitate New Year’s Day marriages and comply with a waiting period in Maryland law.

The opinion leaves it to counties to decide whether to make such an accommodation, however.

The formal advice was issued in an attempt to clear up confusion in the wake of this month’s passage of Question 6, the ballot measure upholding Maryland’s gay nuptials law. The measure passed 52 percent to 48 percent.

Early word out of the attorney general’s office was that same-sex marriages in Maryland would likely not take effect until Jan. 4.

That’s because Maryland has a two-day waiting period once clerks issue licenses. With Jan. 1 being a holiday, that would mean licenses could not be issued until the following day.

Under Thursday’s opinion, it will be possible for clerks to issue licenses in advance of Jan. 1 and make them effective on New Year’s Day.

Loretta E. Knight, clerk of the Montgomery County Circuit Court, said Thursday afternoon that she had just received the state opinion and was reviewing it.

“We’re going to try to be consistent with other courts,” said Knight, who is also president of the Maryland Association on Circuit Court Clerks.

This post has been updated since it was first published.