(Adds details of release, background)
OTTAWA, July 18 (Reuters) - Canada's annual inflation rate in June edged up to a 28-month high of 2.4 percent, the second month in a row it has exceeded the Bank of Canada's 2.0 percent target, Statistics Canada data showed on Friday.
Market analysts had expected the annual rate to stick at the 2.3 percent level recorded in May. The rate was the highest since the 2.6 percent seen in February 2012.
The Bank of Canada - which has long fretted about the risks of low inflation - said on Wednesday the recent surge was temporary and forecast the overall rate would drop below 2.0 percent next year.
Rising prices for shelter, food and transportation were largely responsible for the increase in the annual inflation rate. Prices for shelter and food both rose by 2.9 percent from June 2013.
The Bank of Canada's closely watched core inflation rate, which strips out the prices of some volatile items, increased to 1.8 percent from 1.7 percent in May. The core rate was the highest since the 2.0 percent seen in June 2012.
The central bank has kept its key interest rate frozen at a near record low 1.0 percent since September 2010 and says it will not consider a hike until inflation hits the 2.0 percent target and the sputtering economy recovers.
Reporting by David Ljunggren; Editing by Chizu Nomiyama