In one of his first acts as the 47th president of the United States, Donald Trump signed an executive order aimed at ending automatic citizenship rights for nearly anyone born on US territory - known as "birthright citizenship".
It's a policy change he's long promised, but implementing it hasn't been easy. After multiple legal challenges blocked the order from taking effect, the Supreme Court is now due to consider the case on Wednesday.
Trump's order seeks to deny citizenship to the children of people who are either in the US illegally or on temporary visas.
Most legal scholars say the president doesn't have the power to unilaterally change the law in this area, which is based on an amendment in the US Constitution.
The first sentence of the 14th Amendment to the US Constitution establishes the principle of birthright citizenship:
"All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the state wherein they reside."
Immigration hardliners argue that the policy is a "great magnet for illegal immigration" and that it encourages pregnant women to cross the border in order to give birth and remain in the US, an act that has been pejoratively called having an "anchor baby". They also decry "birth tourism", where people travel to the US to have babies and then return home once their children's citizenship is established.
Supporters of birthright citizenship point out that it has been the law of the land for well over a century and that eliminating it would create a "permanent subclass of people born in the US who are denied full rights as Americans".
The concept of birthright citizenship, also known by the legal term "jus soli", is based in English common law and was generally accepted to apply to white men throughout early American history.
However, it did not become part of the Constitution until 1868, when the 14th Amendment was passed in the wake of the US Civil War in order to settle the question of the citizenship of freed, American-born former slaves.
Previous Supreme Court cases, like Dred Scott v Sandford in 1857, had determined that African Americans could never be US citizens. The 14th Amendment overrode that.
In 1898, the US Supreme Court ruled that birthright citizenship applies to the children of immigrants in the case of US v Wong Kim Ark.
Wong was a 24-year-old child of legal Chinese immigrants who was born in the US, but denied re-entry when he returned from a visit to China. Wong successfully argued that because he was born in the US, his parents' immigration status did not affect the application of the 14th Amendment.