Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Senate leaders expressed optimism Tuesday that a government spending deal could be near even as President Donald Trump said he would "love to see a shutdown" if Democrats don't meet his demands on border security and reforming the legal immigration system.

Senate Minority Leader Chuck Schumer, D-N.Y., and Senate Majority Leader Mitch McConnell, R-Ky., told reporters that progress had been made on a deal that would set spending levels for two years — a much longer term agreement than the incremental stop-gap measures Congress has passed so far this fiscal year.

"Senator Schumer and I had a good meeting this morning about a caps deal and the other issues we've been discussing for some months now. I'm optimistic that very soon we'll be able to reach an agreement," McConnell said.

While the exact path to a spending deal is still uncertain, members on both sides of the aisle made it clear Tuesday that nobody wants another government shutdown. Still, Trump mystified Congress by cheering for one just two days before the funding deadline.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I'd love to see a shutdown if we can't get this stuff taken care of," Trump said during a round table with law enforcement at the White House Tuesday afternoon. "If we have to shut it down because the Democrats don't want safety ... let's shut it down."

Rep. Barbara Comstock of Virginia, a Republican facing a tough re-election fight in the midterms, was in attendance and told Trump directly, "We don't need a shutdown over this."

The House of Representatives passed a short-term spending bill Tuesday night, but it has little chance of passing the Senate as written.

It was drafted by Republican leadership to win the support of the conservative Freedom Caucus and defense hawks who are squeamish about supporting a fifth stop-gap funding bill.

It funds the government for an additional six weeks, until March 23, but it would fund the Defense Department with a boost of $65 billion more than last year for the remainder of the fiscal year.

“I urge the Senate Democrats to stop their filibuster and provide our men and women in uniform the resources they need, the support they need,” House Speaker Paul Ryan, R-Wis., said Tuesday morning.

But Schumer, speaking on the Senate floor, said any increase in defense spending should be accompanied by an equal increase domestic spending.

"House Republicans continue marching down a very partisan road," Schumer said, by proposing a funding bill that "will raise defense spending but leave everything else behind."

“We support an increase in funding for our military and our middle class. The two are not mutually exclusive. We don’t want to do just one and leave the other behind,” Schumer added.

It's the same debate that's been raging since the fiscal year began on Oct. 1 — and the reason Congress has continued to pass continuing resolutions instead of appropriating money for the entire year. The incremental bills have given lawmakers more time to reach a deal, but negotiators have yet to reach a consensus on top-line spending levels that would satisfy both parties' demands — increased military spending for Republicans, and an equal increase in domestic spending for Democrats — and fund the federal government for longer than weeks at a time.

Talks have also slowed for unrelated reasons, as well. Republicans were sidetracked in the fall with tax reform, and Democrats halted headway last month to demand progress on protections for Dreamers, immigrants who had been brought to the U.S. illegally as children. Their legal status could be in jeopardy after President Donald Trump gave Congress a March 5 deadline to find a permanent solution to the Obama-era Deferred Action for Childhood Arrivals, or DACA, program.