WASHINGTON — For seven years, the so-called Dreamers — nearly 800,000 young men and women who were brought to the United States illegally as children — have lived in limbo, protected from immediate deportation but without the guarantee of any permanent future in the United States.

On Friday, the Supreme Court agreed to resolve their fate, an announcement that sets in motion what is likely to be a yearlong legal clash over immigration policy and the power of the presidency that will probably culminate next summer with a ruling by the justices.

But by agreeing to take the case, the Supreme Court also provided a window of opportunity during which the Republicans and Democrats in Congress could permanently resolve the status of the young immigrants, perhaps by giving them a chance to earn citizenship.

At stake is a program that protects Dreamers known as Deferred Action for Childhood Arrivals, or DACA, that President Barack Obama created through executive action in 2012. Mr. Trump tried to end the program in 2017, calling it an “end-run around Congress” and saying that Mr. Obama’s use of executive authority to protect the immigrants violated “the core tenets that sustain our Republic.”