Consumer prices rose at their fastest pace in more than 1-1/2 years in February, driven by higher food and energy prices, a government report showed on Thursday, but underlying inflation pressures remained generally contained.

The Labor Department said its Consumer Price Index rose 0.5 percent, the largest gain since June 2009, after increasing 0.4 percent in January.

Core CPI, excluding food and energy -- increased 0.2 percent after advancing by the same margin in January.

Though the rise in core CPI was a touch above economists' expectations for a 0.1 percent gain, it suggested that surging costs for energy and other commodities, which have been hitting producers and consumers alike, had yet to generate the type of broad inflation that would spur the Federal Reserve to respond.

The Fed said on Tuesday it expected the upward price pressure from commodities to be temporary but it would closely monitor inflation and inflation expectations.

In the 12 months to February, overall consumer prices rose 2.1 percent, the largest increase since April, after rising 1.6 percent in January. Core CPI rose 1.1 percent year-on-year, the largest increase in one year, after increasing 1 percent in January.

Rising food and energy prices are exerting upward pressure in some major economies and putting monetary authorities on the edge. But high unemployment in the United States, which is restraining wage growth, is seen dampening inflation pressures from the strong commodity prices.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)