(Adds White House comment)
WASHINGTON, Feb 6 (Reuters) - U.S. President Donald Trump said on Tuesday he would "love" to see another government shutdown as Republicans and Democrats in Congress worked to reach a budget deal that would prevent federal agencies from having to close their doors this week.
As lawmakers in Congress closed in on a bipartisan budget deal that could end months of budget uncertainty, Trump threatened to upend the discussions by insisting that any spending package would have to include changes to immigration laws - the very issue that led to a three-day shutdown last month.
"I'd love to see a shutdown if we don't get this stuff taken care of," he said at the White House.
The White House later clarified that it did not expect the budget deal to include specifics on immigration.
Republican and Democratic leaders in the Senate say they are close to an agreement that could dramatically raise spending levels for both military and domestic programs and ensure that the government will keep operating when temporary spending expires on Thursday.
The deal could potentially put an end to the brinkmanship over spending that has periodically roiled Washington and that resulted in funds running out for the government in January.
"I'm optimistic that very soon we'll be able to reach an agreement," Senate Republican Leader Mitch McConnell told reporters.
Senate Democratic Leader Chuck Schumer said the agreement would include an increase for domestic programs like drug treatment and broadband infrastructure that Democrats have sought, as well as a military spending increase championed by Republicans.
"We're making real progress on a spending deal," he told reporters.
January's shutdown came about after Democrats insisted that any spending bill must also include protections for young immigrants who were brought to the country illegally as children, who are known as "Dreamers."
Democrats are not taking that approach this time around.
"Nobody wants another one but him," Schumer said.
Trump's fellow Republicans, who control both chambers of Congress, are also eager to keep spending and immigration separate.
"We don't need a government shutdown on this," Republican Representative Barbara Comstock told Trump at the White House.
The potential budget deal in the Senate could head off another round of the last-minute posturing that preceded last month's shutdown.
The Republican-led U.S. House of Representatives was set to vote on Tuesday evening on a stopgap spending bill that would fund much of the government through March 23 and fund the military through Sept. 30, the end of the federal fiscal year.
That measure is not likely to survive unscathed in the Senate, where Republicans cannot pass spending bills without some Democratic support. McConnell and Schumer could incorporate their agreement on domestic and military spending into the stopgap measure, which then would have to win passage in the House.
Congress also faces another looming deadline, as the United States could have trouble paying its bills within weeks if lawmakers do not take the politically painful step of raising the debt ceiling.
The third-ranking House Republican, Representative Steve Scalise, said negotiations over the debt ceiling were being coupled with the Senate budget talks.
Lawmakers have been struggling to reach a deal on an immigration bill, despite broad public support for helping Dreamers - hundreds of thousands of young Latinos who were allowed to study and work without fear of deportation under a program set up by Democratic former President Barack Obama.
Trump last year ordered those protection removed by March 5, though a federal court has blocked his administration from ending the program.
Democrats and Republicans in Congress are trying to agree on bipartisan legislation that would protect Dreamers and boost border security. Schumer said the Senate could take up the issue next week.
Trump has said any immigration deal must also include changes to programs for legal immigration that would assess applicants on their skills, rather than their country of origin or ties to U.S. residents. Democrats oppose that idea. (Additional reporting by Makini Brice, David Morgan and Amanda Becker; Writing by Andy Sullivan; Editing by Frances Kerry and Jonathan Oatis)