WASHINGTON — Speaker Nancy Pelosi said Thursday that the Democratic-controlled House won’t pass must-do legislation to increase the government’s borrowing cap until the Trump administration agrees to boost spending limits on domestic programs.

The California Democrat said she’ll agree to increase the so-called debt ceiling, which is needed to avoid a market-cratering default on U.S. government obligations this fall. But she says she’ll do so only after President Donald Trump agrees to lift tight “caps” that threaten both the Pentagon and domestic agencies with sweeping budget cuts.

“When we lift the caps then we can talk about lifting the debt ceiling — that would have to come second or simultaneous, but not before lifting the caps,” Pelosi told reporters.

Treasury Secretary Steven Mnuchin, who is leading negotiations for the administration instead of hard-liners like acting White House budget chief Russell Vought, shares Pelosi’s sentiments, though his top priority is to increase the borrowing cap.

“If we reach a caps deal, the debt ceiling has to be included,” Mnuchin said Wednesday.

Vought, for years an activist with the conservative Heritage Foundation’s policy advocacy arm, took a more aggressive tack after Pelosi’s announcement.

“Democrats’ threat to hold the debt limit hostage to trillions in new spending is reckless and irresponsible, risking America’s full faith and credit,” Vought wrote on Twitter.

Her remarks came as bipartisan negotiations to increase the spending limits have sputtered, though Senate Majority Leader Mitch McConnell, R-Ky., is eager for an agreement. A pair of negotiating sessions last month generated some initial optimism but there hasn’t been any visible progress since.

“We were making some progress but then they kind of backed away from it,” Pelosi said.

At issue are two separate needs that are often linked together.

Probably most important is to increase the government’s almost $22 trillion debt so that it can borrow money from investors and foreign countries such as China to redeem government bonds, pay benefits such as Social Security, and issue paychecks to federal workers. Treasury is using a familiar set of bookkeeping tricks to stay within the existing debt limit but Congress has to act by mid-fall to avoid a first-ever default.

Increasing the spending caps is required to set an overall limit for agency budgets appropriated by lawmakers every year to permit the annual round of appropriations bills, expected to total more than $1.3 trillion, to advance with bipartisan support in both the House and Senate.

Any budget deal would represent the fifth two-year budget agreement since a 2011 budget and debt bill set the stage for much-reviled automatic cuts known as sequestration. Without an agreement, government-wide automatic cuts of $125 billion would slap both the military and domestic agencies.

In his March budget submission, Trump employed bookkeeping gimmicks to protect the defense budget and called for sweeping cuts to domestic programs.

The Democratic-controlled House started advancing the annual spending bills just this week with an almost $1 trillion measure that blends the defense budget with health, human services, and education programs favored by Democrats. The chamber debated amendments to the measure until 4 a.m. Thursday, restarting the debate just hours later. The measure is slated for a final vote next week.

But the Senate, where the process has to be more bipartisan to succeed, has yet to get started.

Pelosi also offered assurances that Congress will act on Trump’s request for humanitarian aid to house and care for hundreds of thousands of migrant refugees seeking asylum in the U.S. after crossing the U.S. border. Trump has asked for $4.5 billion to address the issue but it has become entangled in a fight with house Democrats seeking to put conditions on the aid.

“I have confidence that they will come to a conclusion on it,” Pelosi said. “We have to.”

The Department of Health and Human Services will run out of money to care for the migrants within a few weeks, stoking fears of a humanitarian debacle on U.S. soil.

“There’s not enough tents to keep people out of the sun. The whole thing is a gigantic tragedy and it needs to be fixed right now,” said Rep. Kay Granger, R-Texas, top Republican on the Appropriations Committee. “They are running out of money. ... There is no place to put these people. And to not take care of this right now is just immoral.”