The Supreme Court’s decision today requiring states to issue marriage licenses to same-sex couples will make immigration easier for many couples. Because federal law grants visas based on state laws, same-sex marriage bans obstructed many Americans who wished to marry immigrants of the same-sex.

For federal purposes, same-sex marriage has been legal since the U.S. v. Windsor decision in 2013. Some thought this would put the 60,000 people in binational same-sex marriages on the same footing as everyone else for immigration purposes, but that’s not how immigration law works in practice.

There are no federal marriage licenses, so immigration law relies on the marriage certificates issued in the jurisdiction where marriage was legally formed. “As a general matter,” U.S. Citizenship and Immigration Services writes, “the law of the place where the marriage was celebrated determines whether the marriage is legally valid for immigration purposes.”

Immigrants living in states that prohibited same-sex marriage, which at the time of the Windsor decision were a majority, were required to marry outside their home state. For immigrants in many states, this would have required a flight halfway across the country — “self-deportation” to another state for your marriage ceremony.

No more. Rather than being forced to leave their homes on the most important day of their relationships, the Supreme Court decision in Obergefell v. Hodges wipes away these obstacles, putting same-sex partners wishing to stay in the country on truly equal footing with other Americans.

Still, this decision will not help foreign spouses married in countries that prohibit same-sex marriage. For these immigrants, Memphis-based immigration attorney Greg Siskind recommends taking advantage of a 2001 memo from then-Secretary of State Colin Powell that allowed same-sex couples in these circumstances to obtain temporary visas. Now they come here for marriage and adjust status to legal permanent residency.

But no matter what, this decision is a step forward for the rights of Americans to marry foreigners freely. Thanks to this ruling many Americans will have an easier time planning their weddings and living their lives with their spouses.