By Promit Mukherjee

OTTAWA, Aug 17 (Reuters) - Canada's annual inflation rate accelerated to 3% in July, slightly more than expected, as renewed United States-Iran tensions drove gasoline ‌prices, while the cost of travel tours also rose, data showed on Monday.

On ‌a monthly basis, the consumer price index rose by 0.5%, Statistics Canada said, once again driven by an ​increase in gasoline costs.

The inflation rate now sits at the ceiling of the Bank of Canada's 1% to 3% control range.

- Analysts polled by Reuters had projected consumer prices to rise 2.9% annually and 0.4% on a monthly basis in July.

- The increase in headline inflation rate ‌had been widely anticipated because ⁠of higher energy prices, leaving the trend of underlying or core inflation as a more important signal for the BoC.

- Core inflation measures CPI-trim ⁠and CPI-median came at 1.9% and 2% respectively. Both the measures were at 1.9% in the prior month, StatsCan said.

- Economists have said that with core inflation largely hovering around 2%, the ​midpoint ​of the central bank's 1% to 3% control ​range, the BoC is likely to ‌keep its key policy rate on hold for the rest of the year.

- Gasoline was the major driver of the annual rise in CPI, with prices accelerating 25.7% in July against an increase of 20.5% in June, the statistics agency noted.

- Prices for travel tours also contributed to the yearly rise in July as consumers paid more for hotels and ‌flights to the United States, especially to the cities ​that hosted the football World Cup.

- However, a slower ​rise in grocery prices moderated the ​CPI, with food purchased from stores rising by 3.1% in July after ‌posting a 3.9% acceleration in June.

- Despite ​the slowdown in grocery ​costs, July was the 18th consecutive month that grocery price inflation outpaced the all-items CPI.

- Shelter costs, which include rents and mortgage interest costs, continued to be subdued ​with the costs rising 1.3% ‌in July.

- The Canadian dollar slightly firmed after the data with the currency ​trading up 0.17% to C$1.3851 against the U.S. dollar, or 72.20 U.S. ​cents.

(Reporting by Promit Mukherjee; Editing by Dale Smith)