The House of Representatives passed the Respect for Marriage Act on Thursday, sending the bill the President Joe Biden's desk for his signature.
The bill passed with bipartisan support by a vote of 258-169. Last week, the bill passed the Senate, garnering 61 votes, after lawmakers added an amendment to protect religious organizations.
The Respect for Marriage Act does not mandate states to legalize same-sex marriages but does require them to recognize marriages performed in other states.
"Just as I began my career fighting for LGBTQ communities, I am overjoyed that one of the final bills I will sign as speaker will be the Respect for Marriage Act: ensuring the federal government will never again stand in the way of marrying the person you love," House Speaker Nancy Pelosi wrote in an op-ed in the Washington Post.
The bill gained traction after Supreme Court Justice Clarance Thomas suggested that the justices should revisit Obergefell v. Hodges in his opinion on the ruling to overturn Roe v. Wade.