UNDER GOV. Robert F. McDonnell (R), Virginia has added to the mountain of debt it owes the state pension system, which covers half a million active and retired government employees, including more than 200,000 teachers. The figures, starting with $20 billion in unfunded liabilities, are alarming and will saddle state taxpayers with a major financial burden for years. While the governor and state lawmakers are not exclusively to blame for the deepening hole of pension liabilities, they have contributed to it.

Now Mr. McDonnell has wisely resolved to start climbing out of the hole, calling the problem “so severe I will not pass it on to another governor.” He proposed an infusion of $2.2 billion of state funds into the retirement system over the next two years — nearly 3 percent of total general fund spending and the largest contribution ever. That’s an important and timely initiative, though it is likely to come at a heavy cost to other state programs and services.

As recently as 2008, the pension system’s assets accounted for more than 80 percent of its obligations — the level considered minimally acceptable. Then the recession hit, driving down the value of the system’s investments as well as projections of future earnings. The retirement system’s $50 billion in assets are now less than 70 percent of what it needs to meet long-term obligations to current and future retirees — a warning sign for credit-rating firms that could imperil the state’s AAA bond rating.

The commonwealth’s $20 billion pile of pension debt has grown from $12 billion in 2008; about a fifth of the increase is due to the state’s failure to make adequate contributions to the retirement system since Mr. McDonnell became governor.

In contrast to Virginia’s proud history of sound financial management, its recent performance in meeting its pension obligations doesn’t even stand up well compared with the rest of the country. In 2009, for instance, the commonwealth ranked 37th among states in the percentage of recommended contributions paid into pension system — and that was before Mr. McDonnell’s decision to postpone a major payment into the system.

In the past fiscal year, the state’s contributions were less than 40 percent of the $1.3 billion recommended by the state pension system’s Board of Trustees — the lowest level in more than a decade. Even if the state increases its contributions to 75 percent of the recommended level over the next 10 years, it would add $34 billion to its liabilities by 2022. Unless there is a drastic and sustained change in course, the hole the state has dug for itself will continue to get deeper. Mr. McDonnell’s $2.2 billion initiative is an excellent start but only a start.

This is the public-sector equivalent of underpaying or ignoring your monthly credit card statements, blithely assuming they will be paid off, somehow, in better days ahead.

Mr. McDonnell is now taking action, but the state’s room for maneuvering is limited. Government employees in Virginia are generally underpaid compared with their counterparts in the private sector. That means the state must offer relatively generous retirement income — typically in the low-to-mid-$20,000 range annually — to attract qualified workers.

Last year, Mr. McDonnell tried to shift the state’s pension system from a defined benefit plan to a defined contribution system, akin to the private sector’s 401(k) plans. The legislature balked, although it has adopted some modest measures to achieve long-term savings, including requiring employees to make contributions to the pension fund and reducing the inflation-indexing of benefits.

A number of additional steps along those lines would be helpful, if politically difficult, and Mr. McDonnell should press for them. These might include requiring employees to work more years before reaching retirement age; postponing the payment of full benefits until retirees reach a certain age (as Social Security does); or having state workers, who now contribute 5 percent of their salaries to their retirement fund, increase their contributions to fund more of their retirement benefits. These and other options are examined both in a report by the Joint Legislative Audit and Review Commission and in a recent paper for the Thomas Jefferson Institute for Public Policy by Robert C. Carlson, a former trustee of the Virginia Retirement System who now chairs the Board of Trustees of the Fairfax County Employees’ Retirement System.

The JLARC report included some sensible recommendations, but it’s strong medicine. One is for the legislature to require that its pension plans be funded at a minimum level, a proposal that would force cuts to other programs and services across state government. Another is to require that in any year the state shortchanges its contributions to the pension fund it perform a long-term analysis of the fiscal impact. Yet even if the state is able to cut current costs over time with modifications or shifts in the system — a big if — that would do little to eliminate existing debt, and the $20 billion problem would remain.

In the past, states tended to shrug off spikes in unfunded pension liabilities, assuming that the value of the funds’ assets would rebound along with upturns in the stock market. But few now expect the market’s long-term performance to bail pension funds out of what have become gigantic shortfalls.

The only plausible solution is for the state to dramatically increase payments into its retirement system, as Mr. McDonnell is proposing. Sustaining that commitment will be critical, but it will also be a tall order in an era of ultra-tight budgets, crumbling roads and infrastructure, and an ascendant state Republican Party that is ideologically opposed to raising taxes.

The JLARC report describes a gathering threat that has mounted under Mr. McDonnell’s watch. To his credit, the governor seems determined that it will not also shape his legacy.