The sluggish economic recovery has only worsened the already bleak financial outlook of both Medicare and Social Security, according to an annual forecast released Friday by the Obama administration.

The report offers fuel to President Obama’s Republican critics and increases pressure on leaders of both parties to agree on a long-term plan to preserve the nation’s principal safety net for the elderly.

Medicare’s main trust fund will be depleted by 2024, five years earlier than projected last year, according to the report by the trustees overseeing the program — largely because they have downgraded their expectations of economic growth.

The Social Security trust fund is now projected to last until 2036, just a year earlier than last year’s estimate. But once the fund is exhausted, the incoming annual payroll taxes that pay for the program will only be sufficient to cover three-fourths of the annual retirement benefits it is required to pay seniors.

By contrast, after the Medicare fund that covers hospital care for the elderly is exhausted, incoming revenue from Medicare taxes will initially be enough to cover 90 percent of annual expenses. That share will decline to about 75 percent by mid-century, then rise to 88 percent by 2085.

This year also marks the first time that both programs are paying out more in benefits than they collect in revenue, requiring other government funds to make up the difference and adding to budget deficits.

Social Security first began operating at a loss in 2010. And contrary to rosier projections in last year’s report, the trustees now expect the program to remain in the red going forward.

Rep. David Schweikert (R-Ariz.), one of the more fiscally conservative Republican freshmen, said in a statement that “this sooner-than-expected insolvency date is due to the failed economic policies of the Obama Administration and its government takeover of health-care.”

Administration officials countered that the report projects that Medicare costs will be 25 percent lower over the next 75 years as a result of spending curbs in the new health-care law.

Richard S. Foster, Medicare’s nonpartisan chief actuary, was less sanguine, writing in a letter accompanying the report that some of the law’s spending curbs “will not be viable in the long range.”

Still, officials agreed that as vexing as the continued rise in health-care costs will prove, at least for the next 20 years the largest single factor driving the skyrocketing expenditures in the two entitlement programs — which together account for about a third of federal spending — will be the surge of baby boomers entering retirement.

Treasury Secretary Timothy F. Geithner also stressed the need to take on the issue sooner rather than later. “We should not wait for the trust funds to be exhausted to make the reforms necessary to protect our current and future retirees,” he said. “Larger more difficult adjustments will be necessary if we delay reform.”

Sen. Orrin Hatch (R-Utah), ranking member of the Senate Finance Committee, sounded a similar note.

“The path to tackling our . . . debt is reforming these two programs,” he said in a statement. “To ignore them is to ignore the fiscal crisis we face.”

Ongoing negotiations to raise the nation’s debt ceiling may provide the first opportunity.

While Social Security appears to be off the table, both sides have acknowledged that some changes to Medicare will be needed to get a debt limit deal through Congress.