President Joe Biden has signed a same-sex marriage protection bill that is being seen as a major win for LGBT couples.
The bill also marks an important turning point in the decades-long process to protect interracial marriage.
After passing the Senate and the House earlier, the Respect for Marriage Act is now law.
The act requires the federal government to recognise the validity of all marriages - including between LGBT and same-sex couples - conducted in states where they are legal.
It's been 55 years since a US Supreme Court ruling first made interracial marriage legal in every state, but it was not protected by federal law until now. Recent remarks by a justice of the top court had caused some concerns that gay marriage and interracial marriage could be overturned by a possible future court ruling.
The newest push to codify the right to gay and interracial marriage into law came after the conservative-dominated Supreme Court in June overturned the constitutional right to abortion, which had been legal nationwide for four decades.
Justice Clarence Thomas, writing his opinion in the abortion case, Dobbs v Jackson Women's Health Organization, called into question the legality of other rights that were established by Supreme Court verdicts, and not by congressional legislation.
He wrote that the court has a "duty" to "correct the error" of previous Supreme Court judgements that established the national right to contraception in 1965, overturned state anti-sodomy laws in 2003 and added the right to same-sex marriage in 2015.
Mr Thomas's opinion made no mention of the case that legalised interracial marriage in 1967 - Loving v Virginia.
Court-watchers noted how that landmark case - like the three he mentioned - came down to the subject of due process and equal protections under the law.
Loving v Virginia was brought by a husband and wife who argued that the state of Virginia had unfairly discriminated against them by refusing to issue a marriage licence. At the time, 16 states still had laws against interracial marriage, known as anti-miscegenation laws.
Liberals said Mr Thomas' omission of the case was hypocritical and motivated by self-interest, given the fact that he has been in an interracial relationship since the 1980s. Conservatives said the black Supreme Court justice's marriage to a white woman is proof that there is no actual judicial threat to racially diverse marriages.
Cathryn Oakley, of the LGBT advocacy group Human Rights Campaign, says that there are currently no states challenging either interracial marriage or same-sex marriage, which are now both the "status quo" under US law.
What the Dobbs decision on abortion made clear to people, she says, is that "these things that we thought were settled law - which people have depended on, people have built their lives around - are in fact not as settled in the eyes of the US Supreme Court as they are in the eyes of the rest of America".
At a signing ceremony at the White House on Tuesday, Mr Biden praised the new law.
"Marriage is a simple proposition," he said.
"Who do you love, and will you be loyal to that person you love? It's not more complicated than that."
At least 94% of Americans approve of interracial marriage, according to a 2021 Gallup poll. The approval figure was only 4% when Gallup first began conducting the survey in 1958.
Figures show that such unions are happening more frequently, too.
In 2019, 11% of all married US adults had a partner who was a different race from them, according to the Pew Research Center.
However, among newlyweds that year, 19% were entering into interracial unions.
John McKeon, a Democratic state assemblyman in New Jersey, last month submitted legislation to specifically legalise interracial marriage in New Jersey - one of only a few states that never banned it in the first place.
There is nothing in the US Constitution explicitly guaranteeing reproductive freedom, equal marriage or contraception, he says.
He argues that all those could be ended someday by a court of jurists who believe rights established by courts - and not legislatures - are not actually rights at all.
Mr McKeon was inspired to propose the legislation after his staff began investigating New Jersey law following the Dobbs decision, and were surprised to find no laws guaranteeing the right to interracial marriage.
New Jersey, he says, was among Democratic-leaning states that "rushed to make certain once Dobbs passed that reproductive freedom was part of our law".
"And similarly that that was done for access to contraception," he tells BBC News.
"And we had already done it as it related to marriage equality. But when I looked on the books, on interracial marriage there is nothing set forth in our law."
Although he recognises that a legal challenge is unlikely, it would be better, he says, "really to cross that T".