A tidal wave of packages is keeping the U.S. Postal Service afloat during the coronavirus recession, boosting the beleaguered agency’s finances to near pre-pandemic levels while legislators and the White House joust over its independence.

When the pandemic’s resulting economic shutdown took hold in early spring, postal leaders told lawmakers the mail service expected to hemorrhage $2 billion a month for 18 months, risking insolvency as soon as September. After Congress approved an emergency $10 billion loan from the Treasury Department, the agency said it could hold out until March 2021, but it’s avoided accessing those funds, wary of conditions the Trump administration is poised to impose in exchange.

Postal leaders, however, in revised financial data provided this week to Congress and obtained by The Washington Post, said rising e-commerce transactions may have — at least temporarily — delivered the USPS from imminent financial ruin. Week to week, package deliveries increased 20 to 50 percent in April compared with the year-ago period, and 60 to 80 percent in May.

The report came in response to a request from Sen. Ron Johnson (R-Wis.) for a revised financial forecast after the agency outperformed dire expectations at the start of the pandemic. The response measures the 13-week period from March 16 to June 13.

First-class and marketing mail, which give the USPS its highest profit margins, continue to struggle. Single-piece, first-class mail volume fell 15 to 20 percent week to week in April and May. Marketing mail, the hardest-hit segment, tumbled 30 to 50 percent week to week during the same period.

Packages are flooding the Postal Service -- Package volumes at the U.S. Postal Service during the coronavirus pandemic are dramatically out-performing the same period in 2019. The sharp increase is propping up the USPS's finances.

At the start of the pandemic, the Postal Service had $9.2 billion in cash, roughly two months of pay for its 630,000 workers. It now has $13.4 billion in cash after tapping a separate $3.4 billion loan from Treasury.

If package volumes persist at 15 to 20 percent above normal levels in the coming months and the Postal Service does not do any more borrowing, it will delay its solvency crisis until October 2021. But if package volumes return to pre-pandemic levels, the agency is set to run out of cash by March. Accessing the $10 billion loan from Treasury would put off insolvency even further.

“Projections continue to show that a liquidity crisis is inevitable,” the Postal Service wrote in a presentation to lawmakers obtained by The Post. “The variable is when in the next 18 months cash will run out.”

The numbers are encouraging, experts say, even while pointing to the Postal Service’s unsustainable financial model and a need for congressional action. The Postal Service hasn’t broken even since 2006 and has racked up $160.9 billion in debt. The bulk of that, $119.3 billion, stems from its annual obligation to prepay retiree health benefits, according to the Government Accountability Office. The Postal Service has defaulted on the payments intended to set up that account since 2011.

The Postal Service said in a statement that it updated its financial forecast “to reflect our actual revenue and volume performance” during the pandemic.

“Thus far, mail volume has drastically declined, but not as significantly as we originally predicted based upon the data we had from the first three weeks of the pandemic, and package volume has been growing exponentially,” the agency said.

“The recent trends indicate that our 2020 financial performance will be better than our early scenarios predicted, but the pandemic will nevertheless have an extremely detrimental impact on the financial condition of the Postal Service.”

The agency’s May financial report published Wednesday evening included more better-than-expected news. The Postal Service lost $1.2 billion that month in 2019, and projected a $771 million loss in 2020. Instead, a 57.6 percent jump in package revenue shaved its loss to $225 million.

The reports give the agency some breathing room for the first time in months. After its Republican-controlled governing board asked Congress for emergency aid in a March stimulus package, the Postal Service turned into a political football. The Trump administration agreed only to provide the Postal Service the $10 billion loan, upon which Treasury Secretary Steven Mnuchin placed terms that allowed the White House to pull the mail service into its sphere of influence.

Trump wanted the Postal Service to quadruple its package rates in exchange for the funding, a price increase postal experts contend would quickly bankrupt the agency by pricing out the likes of UPS, FedEx and Amazon from contracting with the Postal Service. The companies routinely use the agency for “last-mile” service to deliver parcels from local and regional processing hubs to their final destination at homes or businesses. Shipping companies and even some online retailers have signaled they’d rather build out their own independent distribution networks than pay dramatically higher prices with the Postal Service.

Two high-ranking Postal Service officials — board of governors vice chair David Williams and Deputy Postmaster General Ronald Stroman — resigned over Mnuchin’s involvement with the agency, according to several people familiar with their decisions, which included influence over the appointment of Louis DeJoy as postmaster general.

Democratic lawmakers balked at Mnuchin’s moves and urged the Postal Service to hold firm with Treasury over the terms of the loan, betting they could secure more money for the agency in another round of legislation and raising the specter of a disruption in mail service.

Congressional staffers say the Postal Service’s resilience in the recession resets that state of play. Democrats, especially in the Senate, may find it more difficult to work postal funding into a new stimulus bill, given the diminished immediate need, though they say they will keep trying. The agency’s full coffers mean it can rebuff Mnuchin’s attempts to leverage Treasury’s loan.

The latest stimulus bill, the Health and Economic Recovery Omnibus Emergency Solutions Act, or Heroes Act, includes a $25 billion postal grant and provisions that strip Mnuchin’s authority to attach conditions to the loan. Senate Majority Leader Mitch McConnell (R-Ky.) rejected large portions of the legislation drafted by the Democratically controlled House and indicated the GOP would rewrite much of it.

“It’s not an ugly story,” said Robert Fisher, a former Postal Service executive who studies postal performance analytics. “Helping the Postal Service is a good idea. Giving them a blanket $25 billion check is probably a bad policy.”

Industry associations and the agency’s powerful public sector labor unions have elevated the Postal Service’s health into a national political issue. The Package Coalition, an industry group of online retailers led by Amazon, eBay, QVC and CVS Health, ran TV ads in May urging voters to rebuff Trump’s proposal for rate hikes, calling them a “package tax.” The American Postal Workers Union is set to air an ad in the coming days.

“Tell Congress to save the Postal Service, because it’s yours,” the ad says.

“We’re hopeful that the members of Congress don’t view [the new financial data] as an opportunity to put this on the back burner,” former Army secretary and Package Coalition chairman John McHugh said in a phone interview. “This continues to really be an issue that needs to be dealt with right now.”

In early May, Sens. Susan Collins (R-Maine) and Dianne Feinstein (D-Calif.) wrote to Senate leaders along with eight GOP and Democratic colleagues backing emergency funding and unconditioned borrowing for the Postal Service, and plan to introduce a bill in the coming weeks to do the same.

“Recognizing the need to put the Postal Service on a sustainable path beyond this crisis, our bill would also require the Board of Governors to provide Congress with a plan to ensure the long-term solvency of USPS,” Collins said in a statement.

A major test of how postal leaders feel about the agency’s financial footing comes on Sept. 30, when the agency is due to make an $7.8 billion payment to Treasury Department to cover retiree pension and health benefit costs. The Postal Service hasn’t made that payment, much of which comes from an unusual congressional requirement that it pre-fund its retiree health benefits, since 2016.