The U.S. Supreme Court announced Tuesday that it would consider a legal challenge to President Obama’s immigration plan, setting up a decision on one of the president’s most extensive executive actions just months before he leaves office.

The Court will decide whether Obama’s program intended to shield millions of undocumented immigrants from deportation, announced in November 2014, can be implemented across the country. Texas and 25 other states led by Republican governors quickly filed a lawsuit against the unilateral actions, calling them unconstitutional and accusing the president of sidestepping Congress.

Since then, federal courts several times have blocked the program from moving forward. In February 2015, a federal judge in Texas entered an injunction shutting down the program. The U.S Justice Department appealed that decision, but the 5th Circuit Court of Appeals in New Orleans upheld the ruling last November.

The program, known as Deferred Action for Parental Accountability, or DAPA, would allow nearly 4.3 million immigrant parents of U.S. citizens and permanent residents to register with the government and begin working legally without the threat of deportation. Obama’s action also expanded the Deferred Action for Childhood Arrivals, or DACA, to provide the same protections to people who were brought to the United States from other countries as children and raised there.

The case will be heard in April, in the throes of the presidential primary season. Democratic candidates have vowed to defend or expand the president’s actions, while Republican candidates have promised to end protections for undocumented immigrants.

A decision is expected in June. If the Court rules in favor of the actions, the Obama administration would have seven months to implement the policy before the end of Obama’s term next January.