Gov. Bob McDonnell will announce Tuesday that Virginia ended the fiscal year on June 30 with a surplus of $311 million, according to the governor's office.

McDonnell (R) will outline how he will spend the surplus in a news conference on Capitol Square, though most of the money is already accounted for — including funding for roads, education and the Water Quality Improvement Fund, which is used for the Chesapeake Bay cleanup.

This is the second year Virginia has had a budget surplus after three years of revenue shortfalls when the state had to cut billions from the budget. Last year, Virginia ended the fiscal year with a surplus of about $403.2 million -- almost twice the previous estimate.

The state is required by law to maintain a balanced budget, meaning McDonnell would have to impose budget cuts to achieve a surplus if projections indicated that tax revenue was lower than predicted. But monthly reports have instead been showing tax collections somewhat above projections.