There has been no change to the rate of inflation which remained at 2%, the target rate for the Bank of England, according to official figures.
It means prices in June rose at the same rate as in May, data from the Office for National Statistics showed.
Money latest: Number of people claiming non-dom status rises
Inflation was unchanged as hotel prices rose strongly while second-hand car costs fell at a slower pace.
Clothes sales also brought costs down, the ONS said, while raw material costs also fell.
The figure is higher than expected. Economists had forecast a slight fall to 1.9%.
The absence of a fall is likely to be unwelcome news to the interest-rate setters at the Bank of England who have kept borrowing high to bring inflation down to 2%.
An interest rate cut would be good news for mortgage holders and people paying back other forms of debt like loans or credit card bills.
But the market expectation is still on a knife edge as to whether there will be a cut in August.
Key figures possibly influencing Bank of England officials to leave the interest rate unchanged are two other measures of inflation – services and core.
The cost of services grew by 5.7% – the same as a month earlier.
Similarly, core inflation – which excludes fuel and food in measuring price rises – stayed at 3.5%.
Darren Jones, chief secretary to the Treasury, said: “It is welcome that inflation is at target, but we know that for families across Britain prices remain high.
“We face the legacy of fourteen years of chaos and economic irresponsibility. That is why this government is taking the tough decisions now to fix the foundations so we can rebuild Britain and make every part of Britain better off.”
Source Agencies