Surging corporation tax combined with a nearstandstill in Government spending brought about a much- needed improvement in the public finances last month.
July is always a boom month for the taxman when large payments for income tax as well as corporation tax fall due.
But this July's surplus of £2.9 billion was the biggest since 2002 and a eyecatching improvement on £2 billion that flowed into Chancellor Gordon Brown's coffers in July last year.
It also marks an abrupt break with the trend in the first three month of this tax year when the outcome for the public finances ran ominously short of last year.
The improvement was particularly marked for the current budget - which excludes public investment - where the one-month surplus reached £ 5 . 3 billion against £ 3.3 billion last July, National Statistics said.
That still left the current Budget for the 2005/06 year so far £8.1 billion in the red, £400 million worse than in the first four months of the last tax year.
In his Budget, Mr Brown forecast a shortfall of £5.7 billion in the current Budget for the whole tax year.
His self-imposed "golden rule" requires him to balance the current budget over the economic cycle, which the Treasury now says started in 1997/98 and is expected to end last year.
This enables it to count big surpluses in the early years against deficits since 2001/02.
The Government's overall net borrowing over the first four months of the present tax year still stands at £ 15.3 billion against £11.3 billion at the same stage in 2004/05.
In his March Budget, Mr Brown forecast that public sector net borrowing would improve to £31.9 billion from a deficit of £36.9 billion in 2004/5.
Until yesterday it had appeared that slowing growth in the economy would make the outcome worse rather than better.
National Statistics also reported that the total net public debt outstanding at the end of July had risen to £ 424 . 1 billion from £383.2 billion a year earlier.
The new total is equivalent to 34.5 per cent of Britain's gross domestic product, against 32.8 per cent last July.
Mr Brown's second fiscal rule, for " sustainable investment" rule, requires him to keep this net below 40 per cent of GDP. In his Budget, the Chancellor forecast net debt of 35.5 per cent by the end of next March.