The Long Beach and Los Angeles ports won’t have to worry about U.S. Attorney General Jeff Sessions’ threat to pull billions of dollars worth of federal grants from local and state governments that support sanctuary cities.

That’s because even though they are departments of cities at odds with the White House on immigration, the ports don’t depend on the Justice Department that Sessions heads to fund major projects at the waterfront.

But they do rely on other federal agencies to support millions of dollars in infrastructure and security efforts every year and are watching these developments warily.

The Port of Los Angeles’ federal grant funds are primarily administered through the Department of Homeland Security and the Environmental Protection Agency, said spokesman Phil Sanfield. “We will be closely monitoring developments on this issue.”

In an executive order President Donald Trump signed in January, he threatened to pull all funds for state and local agencies that fail to fully cooperate with federal immigration enforcement.

If successful, the move would be a major blow not only to the ports but across California, where legislatures have been weighing a bill that would declare it a “sanctuary state.”

Trump has also proposed a 31 percent budget reduction to the EPA, which could curb local port funding.

Last month, Santa Clara county filed a lawsuit in attempt to block the order and on Wednesday California Attorney General Xavier Becerra filed an amicus brief in support.

“In California, we respect the Constitution and abide by federal law; we expect the federal government to do the same,” Becerra said in a released statement. “The Trump Administration should rethink its plan to force state and local governments to do the federal government’s bidding on immigration.”