WASHINGTON — A divided Supreme Court on Friday ruled that individual judges lack the authority to grant nationwide injunctions, but the decision left unclear the fate of President Donald Trump’s restrictions on birthright citizenship.

The outcome was a victory for the Republican president, who has complained about individual judges throwing up obstacles to his agenda.

But a conservative majority left open the possibility that the birthright citizenship changes could remain blocked nationwide. Trump’s order would deny citizenship to U.S.-born children of people who are in the country illegally.

“Today’s ruling opens the door to a dangerous patchwork of rights in this country, where a child’s citizenship may now depend on the judicial district in which they’re born,” Krish O’Mara Vignarajah, President and CEO of the Baltimore-based Global Refuge, said in a statement. “This is a deeply troubling moment not only for immigrant families, but for the legal uniformity that underpins our Constitution.”

The Baltimore Banner thanks its sponsors. Become one.

Birthright citizenship automatically makes anyone born in the United States an American citizen, including children born to mothers in the country illegally. The right was enshrined soon after the Civil War in the Constitution’s 14th Amendment.

In a notable Supreme Court decision from 1898, United States v. Wong Kim Ark, the court held that the only children who did not automatically receive U.S. citizenship upon being born on U.S. soil were the children of diplomats, who have allegiance to another government; enemies present in the U.S. during hostile occupation; those born on foreign ships; and those born to members of sovereign Native American tribes.

The U.S. is among about 30 countries where birthright citizenship — the principle of jus soli or “right of the soil” — is applied. Most are in the Americas, and Canada and Mexico are among them.

Trump and his supporters have argued that there should be tougher standards for becoming an American citizen, which he called “a priceless and profound gift” in the executive order he signed on his first day in office.

The Trump administration has asserted that children of noncitizens are not “subject to the jurisdiction” of the United States, a phrase used in the amendment, and therefore are not entitled to citizenship.

The Baltimore Banner thanks its sponsors. Become one.

But states, immigrants and rights groups that have sued to block the executive order have accused the administration of trying to unsettle the broader understanding of birthright citizenship that has been accepted since the amendment’s adoption.

Judges have uniformly ruled against the administration.

The Justice Department had argued that individual judges lack the power to give nationwide effect to their rulings.

The Trump administration instead wanted the justices to allow Trump’s plan to go into effect for everyone except the handful of people and groups that sued. Failing that, the administration argued that the plan could remain blocked for now in the 22 states that sued. New Hampshire is covered by a separate order that is not at issue in this case.

As a further fallback, the administration asked “at a minimum” to be allowed to make public announcements about how it plans to carry out the policy if it eventually is allowed to take effect.

Banner reporter John-John Williams IV contributed to this report.