Government borrowing increased last month after the state was forced to pay higher interest on its debt.
Public sector net borrowing, excluding state-owned banks, rose to £6.9bn in June, up £2bn from a year earlier.
The government’s debt costs jumped by more than a third in June from a year earlier after rising inflation pushed up interest on index-linked bonds.
For the financial year to date, borrowing is up £1.9bn to £22.8bn, the Office for National Statistics said.
The Office for Budget Responsibility has forecast that borrowing will be £51.7bn during the current financial year.
The ONS data showed that total government debt, excluding public sector banks, stood at £1.75 trillion at the end of June, which is equivalent to 87.4% of gross domestic product (GDP).