The governor of the US state of Maryland has signed legislation legalising gay marriage, making it the eighth US state to adopt the measure.
The law, passed by state lawmakers in February, takes effect in January 2013.
Opponents of the measure said they would gather the 56,000 signatures needed to mount a challenge to the bill at November's elections.
The move comes weeks after gay marriage was legalised in Washington state, but vetoed by the governor in New Jersey.
"Religious freedom was the very reason for our state's founding and at the heart of religious freedom is the freedom of individual conscience," Governor Martin O'Malley said just before signing the bill.
Many religious leaders in Maryland's large African-American population have said they oppose the measure and are likely to support efforts to overturn the bill, correspondents say.
The measure failed to pass the state assembly last year, partly due to opposition from African-American, Catholic and evangelical lawmakers.
The seven other US states that have already legalised same-sex marriage are Iowa, New York, New Hampshire, Vermont, Connecticut, Massachusetts and Washington, as well as the District of Columbia.