President Trump's decision to rescind DACA was only hours old when the Democratic attorneys general of 15 states filed a lawsuit to stop him.

The president's move is "cruel, short-sighted, inhumane, and potentially devastating to hundreds of thousands of immigrants and millions of people who work with, study with, love, and care for them," New York Attorney General Eric Schneiderman told a campaign-style rally at the City University of New York's John Jay College of Criminal Justice.

Joining New York in the lawsuit are the attorneys general of Massachusetts, Washington State, Connecticut, Delaware, Hawaii, Illinois, Iowa, New Mexico, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont, and Virginia, plus the District of Columbia. Together, they claim Trump's action is "arbitrary, unconstitutional, and contrary to statute."

There is one glaring, fundamental problem with their argument. The Deferred Action for Childhood Arrivals program is a policy -- not law -- imposed by former President Barack Obama solely on his executive authority. At the time it was imposed, in 2012, Obama conceded that a future president could undo it as easily as Obama imposed it. There were serious questions about whether Obama had the authority to act -- many felt the policy was Congress's to make or not make -- but there is no question about a later president's authority to do away with it.

Obama's Justice Department took the same position. In 2014, the Department published a legal analysis of DACA that noted on four separate occasions that "deferred action confers no lawful immigration status, provides no path to lawful permanent residence or citizenship, and is revocable at any time in the [Department of Homeland Security's] discretion."

In other words, the president declared a policy, and a future president can rescind the policy. That is not arbitrary, unconstitutional, or contrary to statute. Nevertheless, with DACA, the attorneys general decided to give it a go. They gave two reasons.

First, they argue that DACA is unconstitutional because it is motivated by President Trump's animus toward Mexicans, who make up about 78 percent of DACA recipients. The lawsuit devotes a significant amount of space to recounting Trump campaign statements about Mexicans. In light of those statements, the states argue, Trump's action on DACA was tainted by his hostility toward Mexicans, and therefore his action "violated the equal protection guarantee of the Fifth Amendment."

Second, the states argue that Trump has also violated the Administrative Procedure Act, because he announced the decision with "minimal formal guidance" and without observing the proper bureaucratic procedures for making such a change.

Some seasoned legal analysts are not impressed. "This lawsuit has no chance," noted John Yoo, the Berkeley law professor who served in the Bush Justice Department, in an email exchange. "The Equal Protection Clause has never been understood to prohibit the U.S. government from making distinctions in whom in chooses to allow into the country."

"Tellingly, the states spend pages collecting every thing that Trump has said about Mexicans, but they cannot provide a single citation to a single Supreme Court precedent that would support their position," Yoo added.

The attorneys general appear to have acted, not because they believe their legal argument is airtight, or perhaps even compelling, but because a similar argument worked with the courts that temporarily stopped the Trump travel executive order. So why not try it again with DACA?

"It's a provocative argument," Schneiderman told MSNBC's Rachel Maddow on September 6. "But it was argued successfully by our coalition of attorneys general [in the travel ban cases], a lot of the same folks in a coalition that sued today."

Indeed, the arguments are similar: In the travel cases, states argued that even temporarily delaying entry of some people from some high-terrorism countries would harm the states economically. The DACA suit says the same thing. Indeed, as they did with the travel ban, the attorneys general devote a lot of space to describing the losses they claim they will suffer if DACA is rescinded.

Some examples: New York says rescinding DACA will increase its health care costs by increasing the number of uninsured in the state. Massachusetts says it will lose $258 million in tax revenues over the next decade, plus "the earning potential from graduates from public universities," plus the scholarship money it has already given to DACA recipients. Washington State says ending DACA would cost the state economy the same amount it cost Massachusetts -- $258 million -- in lost tax revenue and $6.4 billion in GDP growth over the next decade. Connecticut says it will lose tax revenue. Delaware says it will lose precisely the same amount as Massachusetts and Washington State -- $258 million -- in tax revenue over the next ten years. Hawaii says its state schools will lose the "special contributions and perspectives" of DACA students. Illinois says it will lose $6.9 billion over the next ten years. Iowa says it will lose exactly the same amount as Massachusetts and Washington State and Delaware -- $258 million, what are the odds? -- in tax revenues over the next decade. New Mexico argues that, "Immigration boosts housing values in communities, and increases in housing values add to the health of New Mexico's economy." North Carolina says rescinding DACA "will cripple the ability for North Carolina's companies to attract and maintain a robust workforce." Oregon says rescission will "damage the educational mission of Oregon's institutions of higher education." Pennsylvania says it will lose "hundreds of millions of dollars in economic activity -- and tens of millions of state and local tax dollars -- annually." Rhode Island says it will lose the "expended time and funds to hire, train, and manage DACA employees." Vermont estimates that losing the 37 DACA recipients currently working in the state will cause "significant losses in tax revenue and GDP." Virginia says it will lose $1.03 billion in tax revenues.

After trying to establish that they will be harmed by rescinding DACA, the states get to the heart of the matter, which is their claim that Trump's decision was motivated by anti-Mexican bias.

In the travel ban cases, the states succeeded, at least up to the appeals court level, by arguing that Trump's campaign statements showed a bias against Muslims, and that the travel ban would apply disproportionately to Muslims. Therefore, the ban was unconstitutional.

In the new DACA version, the states argue that, "Ending DACA, whose participants are mostly of Mexican origin, is a culmination of President Trump's oft-stated commitments -- whether personally held, stated to appease some portion of his constituency, or some combination thereof -- to punish and disparage people with Mexican roots."

The suit lists more than a dozen Trump statements and actions, starting with the "rapist" reference to some Mexicans in his campaign announcement speech and going through his recent decision to pardon Sheriff Joe Arpaio. The list even includes Trump's August 2015 confrontation with news anchor Jorge Ramos, whom Trump told to "Go back to Univision." Ramos is Mexican-American, the lawsuit notes.

In light of that, the lawsuit argues, Trump's "animus-driven decision" to end DACA is unconstitutional.

With the travel ban cases, judges up to the federal circuit courts of appeals bought the argument. But in case they don't this time, the attorneys general also argue that Trump's DACA action violated the Administrative Procedure Act, which the lawsuit says "requires that federal agencies conduct formal rulemaking before engaging in action that impacts substantive rights."

That just happens to be the same argument that DACA opponents used successfully against the original Obama action. The Fifth Circuit ruled that Obama did not go through the required formal notice-and-comment period before imposing DACA. Now, the new lawsuit accuses Trump of doing the same thing. (Even though the Democratic attorneys general didn't complain when Obama did it.)

The Supreme Court never ruled on the DACA rulemaking question, and even if it ruled in the states' favor it would only delay, and not stop, Trump's clear authority to rescind a predecessor's executive action.

All of which seems to bode not-so-well for the DACA case. The suit "is long on rhetoric and short on law," wrote the law professor Jonathan Turley. "Indeed, the lawsuit appears designed more to 'appease' supporters than convince judges."

"It is purely a political stunt," said John Yoo. "Their position is that the government cannot enforce the immigration law, as required by past decisions of the federal appeals courts, because illegal immigrants from Mexico would be disproportionately harmed (since they are the majority of the recipients of DACA). According to the states, this unequal impact violates the Equal Protection Clause of the Constitution. But if that were true, then the immigration laws themselves are unconstitutional, because they bar most people from entering the United States. In fact, if the states were correct, the immigration laws would always be unconstitutional, unless they granted visas to groups only in proportion to their share of the world population (and the Chinese and Indians would have better lawsuits than the Mexicans here)."

But that's not really what this is about. In the end, the DACA suit, like the travel ban suits, rests on the contention that Donald Trump's alleged bad motives render unconstitutional an action that would be constitutional if taken by another president. In the travel cases, the argument succeeded at the district court and the circuit court levels, but seems likely to fail when it is finally considered in full by the Supreme Court this fall -- although no result is guaranteed. Now, while it is tempting to laugh off the DACA lawsuit, it could be that it succeeds, at least in the initial stages, in front of the same or like-minded judges who engaged in a sort of Trump-only jurisprudence in the travel cases. The law and courts have been just as disrupted as everything else in the new Trump era, first by the president himself, and then by his sometimes hysterical and overreaching adversaries -- including those on the bench.