(Bloomberg) -- Fannie Mae and Freddie Mac investors just got another reason to hope that President Donald Trump turns around his sagging poll numbers and ultimately prevails in November.

That’s because a Monday U.S. Supreme Court ruling signals that it’s going to be much easier for presidents to oust heads of some federal agencies. Fannie and Freddie’s regulator, the Federal Housing Finance Agency, is now run by Mark Calabria, a libertarian economist who’s committed to something shareholders desperately want: the mortgage giants’ release from government control. Calabria won’t likely get the chance to finish that job if Joe Biden wins the White House and fires him.

In its Monday decision, the Supreme Court said the president has broad authority to remove the director of the Consumer Financial Protection Bureau because Congress went too far in insulating the financial industry watchdog from political pressure. In the 2010 Dodd-Frank Act, lawmakers stipulated that the president could only terminate the CFPB chief for “inefficiency, neglect of duty, or malfeasance in office.”

The CFPB and FHFA have identical structures -- they are independent agencies run by a single director. Last September, a panel of federal appeals court judges in New Orleans concluded that the FHFA structure was unconstitutional. The Supreme Court has deferred acting on that case until it resolved the CFPB fight. The high court could now deal with the FHFA matter as soon as July 2.

“This ruling should ensure that the president can now remove the FHFA director at will,” Cowen analyst Jaret Seiberg wrote in a note to clients. “This means election risk is significant for efforts to end the conservatorship, as Joe Biden could fire Calabria as FHFA director on Jan. 20 if the Democrat wins the election.”

Fannie rose 0.5% to $2.04 as of 2:45 pm in New York trading, while Freddie was unchanged at $2.07.

In a statement, Calabria said he respects the Supreme Court’s CFPB decision, while adding that it doesn’t “directly affect the constitutionality of FHFA, including the for cause removal provision.”

Read More: The New Twist in Endless Fight Over Fannie and Freddie.

Hedge funds and other shareholders have long wanted the Trump administration to help them make a windfall by halting the practice of funneling Fannie and Freddies’ profits to the Treasury and freeing the companies from conservatorship. Many of the policies implemented by Calabria since taking over in April 2019 have been focused on ending government control.

Compass Point analyst Isaac Boltansky said Monday’s Supreme Court ruling could prompt Calabria to take on a “sense of urgency” because he may not have many months left leading the FHFA.

(Updates with Calabria comment in seventh paragraph)

©2020 Bloomberg L.P.