Total outstanding government debt in the UK has risen to a record £799bn, or 56.6% of UK GDP - the highest since records began in 1974.
New borrowing in June was £13bn, almost twice as much as a year ago, the Office for National Statistics said, after the downturn shrank tax receipts.
The figures also reflect the cost of bank bail-outs and higher spending on social security benefits.
One economist described the state of the public finances as "dire".
"The figures are modestly better than expected. It doesn't take away from the fact that the state of public finances is dire and that a considerable degree of fiscal tightening will be required," said Philip Shaw, chief economist at Investec.
"The figures are volatile on a month-on-month basis. The size of the shortfall and volatility mean there is little to celebrate."
Analysts had forecast borrowing of £15.5bn in June.
The UK is on track to meet Chancellor Alistair Darling's forecast of £175bn of borrowing this financial year.
'Robust plan required'
Public borrowing for May was revised down to £18.6bn from an initial estimate of £19.9bn.
Business groups warned that, although it appears that public borrowing is in line with the chancellor's forecast, the government must not sit back.
"It would be wrong to tighten policy while the recession continues, but maintaining Britain's international credibility requires a robust plan for restoring our public finances over the medium-term," said David Kern, chief economist at the British Chambers of Commerce.
"This must focus on curtailing public spending across the board, while avoiding damaging measures that would harm wealth-creating businesses."
Meanwhile, a National Audit Office (NAO) report said that tax receipts fell by 10% in the past year - the biggest fall since 1923.