WASHINGTON (Reuters) - If the U.S. Supreme Court in the coming days decides a high-profile immigration case in favor of the Obama administration, the ruling could have an unexpected beneficiary: Republican presidential contender Donald Trump.

U.S. President Barack Obama waves as he walks on the South Lawn of the White House upon his return to Washington, U.S., from Orlando, June 16, 2016. REUTERS/Yuri Gripas

The Obama administration is asking the high court to revive its 2014 proposal to protect up to 4 million people from deportation, a plan that was blocked by lower courts. The court could rule that a president has broad authority to interpret and enforce federal immigration law.

Such a ruling would allow Obama to implement his signature executive action on immigration, aimed at the parents of U.S. citizens’ children, before he leaves office. It could also help Trump, who has put forth his own sweeping and controversial plans on immigration ahead of the Nov. 8 election.

“To the extent the court has language about the president’s wide authority in immigration law generally, that would certainly strengthen Trump’s hand.” said Stephen Yale-Loehr, an immigration law expert at Cornell Law School.

The Supreme Court’s ruling will come at a key phase in the presidential election cycle, with candidates Trump and his Democratic rival Hillary Clinton trading jabs over immigration policy following the mass shooting in a Orlando nightclub in which a gunman killed 49 people.

Trump has proposed curbing immigration from countries with a history of terrorism, blocking the entry of Muslims and deporting the estimated 11 million people in the United States who entered the country illegally. If he wins the race for the White House, Trump might need to invoke his own executive authority - as happened with Obama - if the U.S. Congress does not approve his proposals, which have sparked outrage at home and abroad.

The current case is unlikely to provide any support for Trump’s proposal to bar Muslims, which legal experts say would face other legal hurdles because it targets people on the basis of religion.

But legal experts say it could help Trump if he seeks to block entry from certain countries under a provision of immigration law that gives the president the power to suspend entry of noncitizens whose entry “would be detrimental to the interests of the United States.”

That provision has previously only been used block entry of small groups of people, such as officials linked with foreign governments hostile to the United States. Applying it to entire countries could prompt a similar lawsuit to the one filed against Obama.

Clinton could also seize on an Obama victory in the case, but her own immigration proposals are more modest. She has said that absent action by Congress to reform the system entirely, she would keep Obama’s program in place and seek to expand on it.

Under the U.S. Constitution, Congress passes laws and the executive branch enforces them. In the immigration context, Congress has traditionally given the president considerable leeway to interpret how to implement the laws.

NARROWER GROUNDS

The high court, evenly split 4-4 between liberals and conservatives following the death of Justice Antonin Scalia in February, could decide the case on narrower grounds than the broad question of executive power.

It could avoid touching on immigration law at all by finding that the states challenging Obama’s proposal did not have legal standing to sue. The court could also split 4-4, which would leave in place the lower court decision blocking the plan but without setting any legal precedent.

U.S. presidents generally have discretion to enforce immigration law, but the plan’s challengers said Obama exceeded the limits of his authority by setting up a program that would allow millions to gain temporary legal status and work permits.

Critics say his plan was unlawful in part because it effectively granted relief from deportation to a much bigger class of people than had ever benefited from any similar programs in the past. Texas and 25 other states who filed suit said it was an unconstitutional abuse of power.

Obama’s lawyers told the Supreme Court that Obama was acting within the government’s exercise of prosecutorial discretion to decide who to deport.