U.S. consumer prices rose at a slightly faster-than-expected 0.7 percent pace in June, but the bulk of the increase was due to soaring gasoline prices and the core measure of inflation remained relatively tame, government data on Wednesday showed.

The Labor Department said the rise in the Consumer Price Index was the largest since July 2008. Wall Street analysts polled by Reuters had forecast a 0.6 percent increase, compared with the 0.1 percent gain reported in May.

Gasoline prices jumped 17.3 percent last month, the largest increase since September 2005, and explained the bulk of the increase in the headline index, the Labor Department said.

Compared to the same period last year, consumer prices fell by 1.4 percent, which was the biggest decline since January 1950, when prices fell 2.1 percent, a Labor Department official said. Gasoline prices compared with a year ago were 34.6 percent lower.

Stripping out volatile energy and food prices, the closely watched core measure of consumer inflation rose by 0.2 percent in June, which was slightly more than the 0.1 percent forecast increase. Core prices compared with a year ago rose 1.7 percent, the smallest rise since a matching gain in January.

(Reporting by Alister Bull, Editing by Andrea Ricci)