WASHINGTON — The Supreme Court said Tuesday it will decide whether President Barack Obama has the authority to declare that millions of illegal immigrants be allowed to remain and work without fear of deportation.

The court will probably hear the case in April, with a ruling before it adjourns in June. It provides the last chance that the administration would have to implement the program, announced by Obama in 2014, before he leaves office next January. The program would affect nearly 4 million people.

Obama’s program, called Deferred Action for Parents of Americans and Lawful Permanent Residents, would allow illegal immigrants in those categories to remain and apply for work permits if they have been here for at least five years and have not committed felonies or repeated misdemeanors.

The administration says the program is a way for a government with limited resources to prioritize which illegal immigrants it will move first to deport. But the executive action, taken after Congress failed to enact comprehensive immigration reform, was blocked by lower courts when Texas and 25 other Republican-led states sued to stop it.

“DAPA is a crucial change in the nation’s immigration law and policy — and that is precisely why it could be created only by Congress, rather than unilaterally imposed by the Executive,” Texas Attorney General Ken Paxton said in a filing to the court.

The states said the program “would be one of the largest changes in immigration policy in our nation’s history” and that it raises major issues involving the separation of powers and federalism.

advertisement | advertise on newsday

Paxton welcomed the Supreme Court review, saying Tuesday in a statement: “In deciding to hear this case, the Supreme Court recognizes the importance of the separation of powers. . . . There are limits to the President’s authority, and those limits . . . were exceeded when the President unilaterally sought to grant ‘lawful presence’ to more than 4 million unauthorized aliens who are in this country unlawfully.”

White House officials also welcomed the announcement. Assistant press secretary Brandi Hoffine said in an email the case affects “immigrants who want to be held accountable, to work on the books, to pay taxes, and to contribute to our society openly and honestly.” She added, “The policies will make our communities safer. They will make our economy stronger.”