California Gov. Jerry Brown on Saturday endorsed the idea of his state taking the Trump administration to federal court over its threat to pull law enforcement funding unless cities agree to cooperate with a federal call for stricter immigration enforcement.

While Brown said the decision would ultimately be left to the state’s attorney general, he argued during an interview set to air Sunday on NBC that “it might just be very helpful to get into court and resolve this in a judicial forum rather than in the rhetoric of politicians talking past one another.”

“A few judicious forums to resolve this dispute between the federal government and California – I think – can be very helpful for the whole country, and in a dispassionate way,” Brown told NBC’s Chuck Todd on “Meet the Press,” according to excerpts of the interview.

He added: “Because this back and forth by politicians, it doesn’t really clarify some of the difficulties of the paramount law of the federal government colliding with the sovereign law of the 50 states.”

California Attorney General Xavier Becerra is reportedly eyeing such a move. According to a Sacramento Bee report, citing anonymous sources, Becerra is weighing a lawsuit arguing that only Congress, not the federal government, can set the conditions on grant money.

President Donald Trump decried so-called "sanctuary cities" as a candidate and has vowed to empower officials, like Attorney General Jeff Sessions, to withhold federal grants unless those states, cities and counties agreed to greater cooperation with federal immigration authorities.

According to the Bee’s report, California is worried that a program that brought in nearly $17 million to the state in fiscal year 2017 could be cut off.

The Justice Department announced in July that localities could lose access to one of their most popular grant programs unless they met their conditions.