The Victorian Department of Treasury changed history to conclude the Coalition's 2012-13 budget was in deficit for the first time in a generation under the previous Coalition government.

The extraordinary revision, identified by The Age after an examination of departmental spreadsheets, has sparked a heated political row, with shadow treasurer Michael O'Brien angrily declaring the change to be misleading and dishonest.

Treasurer Tim Pallas. Credit:Louise Kennerley

Treasury now records the 2012-13 budget as being in deficit by $316.6 million, after applying new federal accounting standards that were supposed to begin the following financial year.

The hidden deficit was initially questioned as a mistake by both sides. Previously, Treasury recorded a near-mirror-image $316.4 million surplus for that year, with a final tally of the budget signed off on by the Victorian Auditor General in October 2013.