The year-on-year increase reflected growth of 2.8% in England which was offset by declines in Scotland and Northern Ireland of 1% and 11.9% respectively. House prices remained unchanged in Wales.
Annual house price increases in England were driven by a 6.5% rise in London, and increases in the South West and South East of 2.3% and 2.2% respectively.
The only decrease in England was of 1.3% in the North East.
On a seasonally adjusted basis, UK house prices increased by 0.5% between May and June.
Prices of new dwellings rose by 5.9% during the 12 months to June 2012, while the price of pre-owned dwellings increased by 2.1% in the same period.
In June 2012 prices paid by first-time buyers were 3.1% higher on average than in June 2011. For owner occupiers (existing owners) prices increased by 2.1% for the same period.
But independent buying agent Gabby Adler said transactions are well down on the peak of the market as the ongoing eurozone crisis and concerns over weak economic growth in the UK have a knock-on effect on consumer confidence.
And she added: "This missing confidence is key and until it returns, house prices on the whole will be flat and bump along the bottom, give or take a few variations from region to region."
But she said she is seeing more stock coming onto the market which puts buyers in a stronger position than they have been for some months.
Ashley Alexander, director of estate agent review website MeetMyAgent.co.uk, said to get a true picture of the state of the UK property market, it makes more sense to ignore the London market entirely as sales in the capital are creating a ballast to house prices.
And he added: "Although, based on these figures, house prices appear to be reasonably stable, there are still underlying concerns that can't be ignored. Economic instability, high unemployment and strict mortgage lending criteria continue to be a barrier to sustained price growth, and consumer confidence remains fragile."