Prices on goods affected by tariffs saw biggest surges while prices less contingent on foreign imports saw decreases.

July's consumer price index this week is expected to rise. A Reuters poll of economists forecasts the annual rate at 2.8%, up from June's 2.7%.

Prices were 2.7% higher last month compared with a year ago, and core inflation went up at a higher pace than what was seen in June