AUGUSTA – The state finished the fiscal year that ended June 30 with a $70.4 million surplus, the governor’s office said Tuesday.

The money comes from higher-than-expected corporate income tax collections and sales and use taxes. And while it may help to close a possible $100 million shortfall in the new budget, state law dictates how it can be distributed.

“The surplus puts Maine in a better position to address a number of challenges facing our state,” Gov. John Baldacci said in a prepared statement.

“We are beginning to see signs that our economy is recovering from the recession, but things remain fragile and we must be vigilant.”

Surplus money is allocated to the state’s reserves, the Finance Authority of Maine, the General Fund Operating Capital account, the state retirement system and retirees’ health, capital construction and the governor’s contingency account, according to his press office.

State department heads are preparing proposals for Baldacci in case the federal government doesn’t approve $100 million in Medicaid money. State spending could be curtailed on Oct. 1 if there is no action at the federal level.

Ellen Schneiter, acting commissioner of the Department of Administrative and Financial Services, said some of surplus may help plug that hole.

“Ideally, we would continue to build our reserves, but the 2010 surplus provides more options as we deal with the immediate issue of replacing the anticipated Medicaid dollars,” she said in a prepared statement.