Inflation reached its highest level so far this year in April, when higher energy bills pushed up prices.
The Office for National Statistics said the Consumer Price Index was 2.1% in April, up from 1.9% in March.
That is above the 2% target set by the Bank of England but less than expected.
Computer games and package holiday prices helped to offset the impact of the higher energy bills, sparked by the rise in Ofgem's price cap on gas and electricity.
The ONS said electricity and gas prices rose between March and April 2019 by 10.9% and 9.3%, respectively.
"The upward movement partially reflected the response from energy providers to Ofgem's six-month energy price cap, which came into effect from 1 April 2019," the ONS said.
Last month, Ofgem raised the maximum prices that can be charged for gas and electricity to those who have not switched suppliers and are on default tariffs.
Air fares also pushed up the index, the ONS, said pointing to the late timing of Easter, with prices rising 26.4% on the month.
Prices fell in "recreation and culture" by 0.8% between March and April 2019, compared with a rise of 0.4% between the same two months of 2018. Prices of games, toys and hobbies fell, particularly computer games, the ONS said.