A possible deal on a stopgap spending bill to avert a pre-election government shutdown looked uncertain late Friday after House Speaker Nancy Pelosi and Treasury Secretary Steven Mnuchin did not come to terms.

Two Republican aides familiar with the situation said Pelosi (D-Calif.) had essentially backed out of a deal with Mnuchin that would have traded farm bailout money the White House wants for $2 billion in child nutrition spending Democrats want.

A Democratic aide denied there was any deal in the first place but said Pelosi was pushing Mnuchin for higher spending on child nutrition in exchange for the farm bailout funds. All the aides spoke on the condition of anonymity to discuss ongoing negotiations.

Next steps were unclear. All sides had agreed that the deal would extend government funding through Dec. 11. House Democrats had hoped to file the legislation Friday, but it appeared that Monday would be the earliest that could happen.

But Friday it was unclear whether a bipartisan agreement would be reached at all — or whether House Democrats would file a bill without Republican support and move forward from there.

A failure by Congress to pass the stopgap spending bill by the end of the month would lead to a shutdown on Oct. 1, just weeks before the election.

The finger-pointing and confusion around what was supposed to be a straightforward short-term funding extension underscored the intense partisanship on Capitol Hill and at the White House as the election approaches. It also demonstrated the pressures Pelosi faces from fellow Democrats who have pushed her to give ground to make a separate deal on coronavirus relief legislation — something she has refused to do.

The short-term legislation, presuming it is finalized, was expected to be voted on the House next week, followed by the Senate.

The developments came a day after Trump announced at a rally Thursday night in the battleground state of Wisconsin that farmers would get an additional $13 billion, money from the same fund that the administration is trying to replenish via $30 billion in the short-term spending bill.

Trump has spent several years directing tens of billions of dollars in bailout funds to farmers by using a Depression-era program in a way that even some Agriculture Department officials believed was possibly improper. To continue sending the funds, Trump needs congressional approval, and Democrats have opposed sending more bailout money to farmers, alleging Trump is using the taxpayer money to try to offset the political backlash to his trade policies.

Throughout the day Friday, Democratic aides said Pelosi was strongly opposed to including the $30 billion in the stopgap spending bill.

At a certain point late in the afternoon, however, it appeared she had agreed to do so, on a phone call with Mnuchin, in exchange for $2 billion in child nutrition spending — something that was confirmed by aides in both parties at the time. But she subsequently called Mnuchin back and said she could not make such a deal, aides on both sides said. A Democratic aide said there never was a deal in the first place, only a proffer of sorts.

Trump weighed in on the issue on Twitter earlier in the day, writing: “Pelosi wants to take 30 Billion Dollars away from our great Farmers. Can’t let that happen!”

“We have serious concerns about giving President Trump a blank check to spread political favors,” a senior House Democratic aide involved in the talks said in explaining the Democrats’ opposition to the money. “It is an abuse of taxpayer dollars to give this administration more money so the president can grab headlines with announcements at campaign rallies.”

Pelosi and Mnuchin agreed some time ago on the need for a stopgap spending bill to keep the lights on at government agencies such as the Pentagon and Department of Health and Human Services. Some government programs, including Medicare and Social Security, keep running on their own, but many federal agencies and programs require annual spending bills to stay open from one fiscal year to the next.

Congress has frequently neglected to complete the 12 annual must-pass spending bills on time in recent years, instead resorting to stopgap measures known as “continuing resolutions” that extend agency funding at existing levels for short periods of time. There have also been a number of government shutdowns of varying lengths over the past decade.

Democrats had hoped to get some additional provisions in the bill, including $3.6 billion for election security and a time extension for the census, but Republicans objected and those items were excluded. Instead noncontroversial provisions related to flood insurance and highway funding were expected to be allowed in.

Additionally, despite some speculation among rank-and-file lawmakers that the continuing resolution could be a vehicle for coronavirus relief provisions, that was never anticipated by leadership and did not occur.

Instead, the talks on the short-term spending bill proceeded separately from the stalemate over a new coronavirus bill. That standoff showed no signs of movement Friday, as Pelosi continued to hold out for a $2.2 trillion bill that Republicans have rejected — despite pressure from moderates in her caucus to give ground.

Pelosi dismissed a reporter’s question about whether she was letting the perfect be the enemy of the good regarding the broader coronavirus relief bill. She reiterated that she has already compromised from a $3.4 trillion bill that House Democrats passed in May but the White House and Senate Republicans dismissed.

“It’s not perfect. … Perfect is $3.4 trillion,” Pelosi said. “This is not about perfect being the enemy of the good.”

Trump has recently signaled he would be comfortable with a stimulus bill in the area of $1.5 trillion. The president and House Democrats have said they support legislation that would send another round of stimulus checks to Americans, as well as more unemployment assistance. But many other parts of the package remain unresolved.

The plight of airlines is a growing area of concern for members of both parties. A provision from the Cares Act that required airlines to keep workers on payroll in exchange for aid expires Sept. 30, and major airlines have warned of mass layoffs.

In a letter to congressional leaders and Mnuchin on Friday, the head of United Airlines and the leaders of several major airline unions urged Congress to renew negotiations on a new coronavirus relief bill that would include an extension of the airline Payroll Support Program. The alternative, the letter warned, is “involuntary furloughs” of 16,000 workers.

Pelosi spoke by phone Friday with airline executives and separately with union leaders, pledging support for preserving the at-risk jobs, according to a readout from her office.

Jeff Stein and Lori Aratani contributed to this report.