Imagine the reaction if President Barack Obama had responded by appearing on a friendly cable show and declaring that Texas was out of control and that the feds might need to cut off the Lone Star State’s federal funding. Being sane, reasonable and law-abiding, he didn’t, of course.

And yet two weeks into his tenure, President Donald Trump, in all apparent seriousness, is threatening to weaponize federal revenues to keep California in line, not that he could legally do so.

Over the weekend, the new president told conservative Fox News commentator Bill O’Reilly that the feds might cut off the state financially because California is “out of control.” Trump’s ill-informed riff came in response to a softball question about legislation that would turn California into what O’Reilly called a “sanctuary state.”

Digital Access for only $0.99

“If we have to, we’ll defund,” Trump said in the interview. “We give tremendous amounts of money to California; California in many ways is out of control, as you know.”

Senate President Pro Tem Kevin de León has introduced Senate Bill 54, which would extend certain protections to undocumented immigrants. The bill is being amended, and we haven’t taken a position on it yet.

But as it stands, California schools and health facilities would be barred from sharing information about individuals’ immigration statuses with the feds. We agree. Educators and health care providers shouldn’t do double duty as immigration agents.

Police also would face some restrictions, though the legislation makes reference to federal laws requiring cooperation in certain circumstances. The bill should go a step further by making clear that the state would inform the feds as felons are being released from prison. California should not protect serious or violent felons from deportation.

But there is good reason to separate the work of local cops from that of immigration authorities. As The Los Angeles Times reported, then-Los Angeles Police Chief Daryl Gates, hardly a softy, instituted Special Order 40 in 1979. The order barred officers from initiating contact with anyone for the sole purpose of learning their immigration status and ruled out arrests for immigration law violations.

The point was to help police build trust, without having crime victims and witnesses worry that they would be deported. That’s a reasonable policy, one that serves many police departments well.

Exactly what money Trump would seek to cut is unclear. Perhaps he would seek to tie law enforcement grants to his vision of what it means to cooperate with immigration authorities. We find it hard to imagine that Trump, who ran as the law-and-order candidate, would find it politically wise to cut federal grants to police.

The Legislative Analyst’s Office, using numbers produced by the New York state comptroller, the Tax Foundation and the Pew Charitable Trusts, pointed out in a report last month that California ranks in the bottom 10 states of per capita funding from the feds, and is at the upper end of states in taxes paid.

Of the $370 billion in federal money spent in California, $83 billion goes for Social Security, almost $70 billion for Medicare, and $50 billion for defense contracts and research here. There’s additional money for housing and food for poor people, salaries for federal workers, pensions and benefits for veterans. The state would likely sue if Trump sought to cut any of that.

Punching down at the Golden State might play well with Trump’s voters. But he comes off as authoritarian and ill-informed. The U.S. Treasury is not Trump’s personal bank account. Nor is California some errant child whose allowance can be cut off by whoever is sitting in Dad’s chair.

If the president believes this or any other state is overstepping its authority, he should turn to the Republican-controlled Congress, which holds the power of the nation’s purse strings.

Trump may think he is strong by issuing threats. In reality, he comes off like an out-of-control bully. No matter whom they supported in 2016, all voters should be alarmed at that.