Fighting fire with fire, Texas and six other states filed suit last week to freeze the Deferred Action for Childhood Arrivals program.

The move was a response to another judge’s ruling the week before in a different case that the program should continue full-tilt even though President Trump has ordered its end — which he did on the entirely correct grounds that it was never constitutional in the first place.

Back in 2012, President Barack Obama issued the DACA executive order in a bid to give some legal status to the “Dreamers” — young people brought into the United States illegally as children who’ve grown up here and would be strangers if they went back “home.”

Then Trump in 2017 issued an order ending DACA — in order to forestall yet another ruling, on a different suit by Texas and 26 other states, that was going to strike down the Obama action effective immediately. Trump actually aimed to keep DACA going for six months, during which time he wanted Congress to pass compromise legislation.

Which it might have done, except that other judges quickly started ruling that Trump’s action was unconstitutional.

Which is crazy: After all, Obama for years had said he lacked the power to unilaterally legalize the Dreamers. That required action by Congress.

Yes, he eventually decided to try it anyway, perhaps hoping that the courts would back him up. But that would take some major “creativity.” While it’s reasonable to argue that a president can order the Justice Department not to make any effort to enforce the law in certain cases, Obama claimed he could grant Dreamers the right to work “legally,” when US law plainly states they can’t.

Indeed, the courts struck down a similar Obama order, supposedly granting protections to illegal-alien parents of US citizens, back in 2015.

These court battles mirror the political ones over the Dreamers all too closely, with each extreme seeking total victory when a compromise is the only possible solution. Problem is, the courts aren’t supposed to play politics — as judges have done by holding up Trump’s order.

Eventually, one or all of the DACA suits will end up before the Supreme Court, which is pretty much guaranteed to end the farce Obama began.

Sadly, the Dreamers’ best hope now is that Congress will do its job once the court games end.