President Barack Obama said he supports recognizing the unions of gay and lesbian couples in a broad immigration bill currently before Congress.

Obama, who is on a three-day tour of Mexico and Costa Rica, made his remarks on Friday during a joint news conference with Costa Rican President Laura Chinchilla.

“I can tell you I think that this provision is the right thing to do,” Obama said. “I can also tell you I'm not going to get everything I want in this bill. Republicans are not going to get everything that they want in this bill.”

Democratic Senator Patrick Leahy of Vermont is expected to propose the amendment to the legislation next week. Under the current law, a gay or lesbian American citizen cannot sponsor an immigrant spouse for citizenship due to the Defense of Marriage Act (DOMA), which prevents the federal government from recognizing such marriages. Leahy's amendment would allow a gay U.S. citizen the ability to seek a visa for a spouse.

Conservatives have suggested that the provision would gut Republican support for the immigration bill and doom to failure the measure.

However, the point may be moot if the Supreme Court strikes down DOMA next month. Such a ruling would allow the federal government to treat all spouses equally, regardless of sexual orientation.