Twelve-month inflation slowed unexpectedly to 4.2 percent in June from 4.5 percent in May as cheaper toys and televisions helped to offset high food and energy prices, official data showed on Tuesday.

Consumer Prices Index inflation also surprisingly fell by 0.1 percent in June from May on a month-on-month basis, the Office for National Statistics (ONS) said in a statement.

Analysts had forecast the annual rate to remain at 4.5 percent, which had been the highest level since September 2008, and predicted a month-on-month gain of 0.2 percent, according to a poll by Dow Jones Newswires.

"The main downward effects came from games, toys and hobbies, particularly computer games, and from audio-visual equipment and related products, where price discounting this year of items such as digital cameras, DVDs and televisions contributed to the downward movement," the ONS said in a statement.