Rising gasoline and food prices lifted consumer spending in March and the increase in overall inflation from a year-ago was the largest in 10 months, government data showed on Friday.

The Commerce Department said consumer spending increased 0.6 percent, rising for a ninth straight month, after an upwardly revised 0.9 percent advance in February.

Economists polled by Reuters had expected spending, which accounts for about 70 percent of U.S. economic activity, to rise 0.5 percent in March after a previously reported 0.7 percent rise.

When adjusted for inflation, spending edged up 0.2 percent last month after rising 0.5 percent in February.

The government reported on Thursday that consumer spending grew at a 2.7 percent annualized rate in the first quarter after a 4 percent increase in the final three months of 2010.

The moderation in spending was not as sharp as economists had feared, suggesting that consumers were somewhat adapting to the high commodity prices, but could face a litmus test should gasoline prices shoot above $4 a gallon.

High food and energy prices kept inflation elevated last month, with the personal consumption expenditures price (PCE) index up 0.4 percent after rising by the same margin in February. Compared to March last year, the index was up 1.8 percent - the largest increase since May - after rising 1.6 percent in February.

The core PCE index -- excluding food and energy - slowed to a 0.1 percent increase after rising 0.2 percent in February. The core index, which is closely watched by Federal Reserve officials, increased 0.9 percent in the 12 months through March. The index rose 0.9 percent in February and the Fed would like (Reporting by Lucia Mutikani, Editing by Andrea Ricci)