Oil revenues dropped by more than two-fifths in 2012/13, pushing Scotland's deficit above the UK's for the first time in recent years.
Government Expenditure and Revenue Scotland (Gers) figures show an unplanned stoppage in the Elgin oil field and the oil industry's shift towards investment as the cause of the sharp drop.
The Elgin shutdown was a "one-off event", according to First Minister Alex Salmond, who said he does not expect unplanned stoppages every year.
Scotland's deficit is -5.9%. The UK ran a deficit of -5.8% in the same period after lagging behind Scotland in recent years, Gers figures show.