WASHINGTON — Congress’ top Democratic leaders abruptly pulled out of a planned meeting Tuesday with President Donald Trump after he attacked them on Twitter, casting doubt on the prospects for a quick agreement to avert a government shutdown at the end of next week.

Trump tweeted early Tuesday that “I don’t see a deal!” with Senate Minority Leader Charles Schumer and top House Democrat Nancy Pelosi of California and accused them of being soft on crime, taxes and illegal immigration.

Schumer and Pelosi shot back by canceling the afternoon White House meeting and asking instead for immediate talks with top Republican leaders in Congress.

“Given that the president doesn’t see a deal between Democrats and the White House, we believe the best path forward is to continue negotiating with our Republican counterparts in Congress instead,” Schumer, D-N.Y., and Pelosi said in a statement. “Rather than going to the White House for a show meeting that won’t result in an agreement, we’ve asked Leader McConnell and Speaker Ryan to meet this afternoon.”

Meanwhile, Trump on Tuesday made his third visit to the Capitol in little more than a month. This time, he’s trying to make the sale to Senate Republicans on his signature tax bill, which has several GOP holdouts.

White House Press Secretary Sarah Huckabee Sanders said McConnell and Ryan still planned to attend the White House session.

“The president’s invitation to the Democrat leaders still stands and he encourages them to put aside their pettiness, stop the political grandstanding, show up and get to work,” Sanders said. “If the Democrats believe the American people deserve action on these critical year-end issues as we do, they should attend.”

Ryan and McConnell said the path to any agreement must go through Trump and the White House.

“Democrats are putting government operations, particularly resources for our men and women on the battlefield, at great risk by pulling these antics,” Ryan and McConnell said in a joint statement of their own. “There is a meeting at the White House this afternoon, and if Democrats want to reach an agreement, they will be there.”

Congress faces a Dec. 8 deadline to pass stopgap legislation to keep the government open and faces a slew of other unfinished legislation, including hurricane aid and funding for children’s health.

It was hoped the White House meeting might lay a foundation to keep the government running and set a path for a year-end spending package to give both the Pentagon and domestic agencies relief from a budget freeze. A host of delicate issues, including treatment of immigrants brought illegally to the U.S. as children, were on the table.

But in an early morning Twitter attack, Trump upended the negotiations, appearing to signal that he’ll adopt a hard line.

“Meeting with ‘Chuck and Nancy’ today about keeping government open and working. Problem is they want illegal immigrants flooding into our Country unchecked, are weak on Crime and want to substantially RAISE Taxes. I don’t see a deal!” Trump tweeted.

Now, the immediate question is whether negotiations can get back on track. And if not, what will Republicans do to seek to avert a shutdown?

The pending tax bill can advance without fear of a Democratic filibuster in the Senate, but Trump and congressional Republicans need Democratic help to advance this year’s long-delayed round of spending bills. It’s not just the threat of a Democratic filibuster in the Senate but the affirmative need for Democratic votes in both House and Senate to make up for GOP defections on the right.

A temporary spending bill expires Dec. 8 and another is needed to prevent a government shutdown. Hurricane aid weighs in the balance and Democrats are pressing for legislative protections for immigrants known as “Dreamers,” even as conservative Republicans object to including the issue in the crush of year-end business.

There’s also increased urgency to find money for the children’s health program that serves more than 8 million low-income children. The program expired on Oct. 1, and states are continuing to use unspent funds. Arizona, California, Minnesota, Ohio, Oregon and the District of Columbia are among those expected to deplete that money by late December or in January.

The leverage that Democrats carry has GOP conservatives on edge and they have been reluctant to make early-stage concessions that might foul the mood of rank-and-file Republicans while the tax bill is in the balance.

Trump hasn’t engaged much with Pelosi and Schumer since a September meeting that produced an agreement on a short-term increase in the government’s so-called debt limit and the temporary spending bill.

Trump reveled in the bipartisan deal for a time and generated excitement among Democrats when he told then he would sign legislation to protect from deportation immigrants who were brought to the country illegally as children.

Trump in September reversed an executive order by former President Barack Obama that gave protections to these immigrants, many of whom have little or no connection to their home country. Shortly afterward, he told Pelosi and Schumer he would sign legislation protecting those immigrants, provided Democrats made concessions of their own on border security.