 -- President Donald Trump has spent much of his summer mocking, prodding and complaining about a Congress that was dysfunctional long before he arrived in Washington.

Now he’s counting on that Congress to bail him out — with the fates of nearly 800,000 individuals in the balance.

Trump’s decision to wind down the Deferred Action for Childhood Arrivals program caps an extraordinary monthslong public and private deliberation that pitted his public statements and basic values against each other.

By highlighting deep divisions in his own party, not to mention adding to Congress’ already overstuffed agenda, Trump appears to have made the political situation even trickier than it was.

The competing urgencies were evident in a long written statement he issued today to explain his decision. He reiterated his call to “resolve the DACA issue with heart and compassion” but said the interests of “American citizens” must come first.

“Our first and highest priority in advancing immigration reform must be to improve jobs, wages and security for American workers and their families,” Trump said in the statement. “It is now time for Congress to act!”

Tellingly, Trump had Attorney General Jeff Sessions, a well-known immigration hard-liner during his days in the Senate, outline the administration’s moves. Three times in his prepared remarks, he referred to DACA enrollees — people who grew up at least in part in the United States — as “illegal aliens.”

“The compassionate thing is to end the lawlessness, enforce our laws,” he said.

Trump’s frustration in reaching a solution stemmed in part from his own contradictions. He could not both protect the so-called Dreamers — unauthorized immigrants brought to the U.S. as children who enjoyed deportation protection granted by his predecessor — and reverse an executive order he flatly said was “illegal.”

So his solution to the problem was to not solve it. Instead, the Trump administration is leaving it to Congress to navigate a legal and political thicket, now with yet another deadline on a crowded schedule for the coming months.

A standalone DACA bill, dealing just with the category of people affected by this decision, would almost surely pass with broad, bipartisan support. But that isn’t what legislative leaders are inclined to let move forward. It’s also not even clear that Trump would sign such a bill into law.

“It is important that the White House clearly outline what kind of legislation the president is willing to sign,” said Sen. Marco Rubio, R-Fla. “We have no time to waste on ideas that do not have the votes to pass or that the president won’t sign.”

When things get broader on immigration, they tend to get more complicated. The past decade and a half has seen attempts at immigration reform fail under every conceivable political scenario, with Democrats and Republicans trading control of the White House and Congress but seeing the same outcomes.

Then-President Barack Obama acknowledged as much when he put the DACA program in place in 2012.

“This is a temporary, stopgap measure,” Obama said at the time. “Precisely because it is temporary, Congress needs to act.”

Yet there’s little to suggest that a new deadline will accomplish what old deadlines didn’t. It seldom works for a president to punt to Congress to avoid blame, particularly if the White House does not intend to lobby hard for a specific outcome.

Meanwhile, real people have to make real decisions about their lives. Obtaining DACA status required coming out of the shadows and volunteering personal information — meaning the Trump administration has a record of where all program enrollees live and work.

While Trump is looking to Congress to help, he will own the legacy of his decisions, in both the short and long term.

With memories of his Charlottesville, Virginia, comments still raw, he rescinded a policy that has the effect of turning the country inward. The nation may wind up going back on its word to a large group of people who have always considered themselves Americans.