Virginia on Wednesday posted a budget surplus of nearly half a billion dollars for the third straight year, paving the way for a round of one-time bonuses for state workers who have gone five years without a pay raise.

The state saved $319 million between last July and June 30, thanks largely to state agencies operating below their budgeted levels, Gov. Bob McDonnell said. With the $129 million in extra tax revenue the state reported last week, Virginia's total budget surplus this year is $448.5 million.

Virginia finished the 2010 budget year with a $403 million surplus. In 2011, it had a $544.8 million surplus.

"We are proving that, unlike Washington, we can actually balance a budget annually," McDonnell said. "We can spend less than appropriated while maintaining quality services."

But while McDonnell said the state's improved outlook was a credit to his administration's fiscal discipline, Democrats looked elsewhere.

"Any governor is going to claim credit for good things that are happening, but a lot of it has to do with external conditions, especially in Virginia, with a very, very fiscally conservative way of budgeting," said Del. Bob Brink, D-Arlington.

The extra cash from savings means state employees will receive a one-time, 3 percent bonus this December at a cost of $77.2 million. Employees have not received a raise in five years, though they received a bonus in 2010 and their pay jumped 5 percent last year to offset a 5 percent contribution they had to make to their pension plans.

About $78 million of the surplus will be placed in a rainy-day fund, bringing the fund's total to $689 million. An additional $16.9 million will help speed up Virginia's efforts to clean up the Chesapeake Bay.

Despite the rosy budget news, McDonnell warned Wednesday that deep federal cuts to military and services that take effect in January would undermine Virginia's economic recovery. McDonnell has ordered the state to set aside $30 million to offset any potential cuts.

A recent study showed Virginia could lose more than 200,000 jobs if Congress doesn't act to avoid $500 billion in defense cuts. Federal spending helped Virginia maintain a better-than-average unemployment race of 5.7 percent, but deep cuts would send its economy reeling.

"A failure to stop [these cuts] will impact every state in the nation," McDonnell said, "and I think imperil national security and our economic recovery at the same time."