U.S. consumer prices rose in August from July on a spike in gasoline costs, the Labor Department said on Wednesday, but the underlying trend pointed to muted inflation pressures.

Analysts said the risk of inflation remained low as the economy crawled out of its worst recession in 70 years.

The Consumer Price Index rose 0.4 percent last month after having been flat in July, a touch above market expectations for a 0.3 percent gain.

Gasoline prices surged 9.1 percent after falling 0.8 percent in July. Compared to the same period last year, consumer prices declined 1.5 percent. Prices have been falling on an annual basis since March this year.

We're in the part of the economic cycle where inflation is not an imminent concern, not to say there won't be long-term issues with the Fed's balance sheet, said Steve Goldman, market strategist at Weeden & Co in Greenwich, Connecticut.

U.S. stock index futures remained higher after the data, while Treasury debt prices trimmed gains.

Stripping out volatile energy and food prices, the closely watched core measure of consumer inflation rose 0.1 percent in August after rising 0.1 percent in July.

This was as prices for new vehicles fell 1.3 percent, the largest decline since October 1972, reflecting government-sponsored incentives that gave discounts to consumers to trade in their old gas-guzzling cars for new, fuel-efficient ones. The Labor Department said the program that ended in August could potentially impact CPI into September.

Markets had expected core CPI to rise 0.1 percent last month. Compared to August last year, the core inflation rate rose 1.4 percent, the smallest rise since February 2004, after increasing 1.5 percent in July.

Analysts are closely watching consumer prices for signs of inflation pressures in the wake of massive efforts by the government and the Federal Reserve to rescue the economy from the worst recession since the Great Depression of the 1930s.

Government data on Tuesday showed a jump in producer prices in August as energy costs soared, but analysts reckon labor market slack and weak domestic consumption will keep price pressures in check for a while.

A report from the Commerce Department showed the U.S. current account shrank in the second quarter to $98.8 billion, the smallest deficit since the fourth quarter of 2001.

The deficit contracted from an upwardly revised $104.5 billion in the first quarter and compared with analysts' forecast for a second-quarter gap of $92.0 billion.

Separately, demand for U.S. home loans fell last week as fixed mortgage rates rose in the holiday-shortened week, the Mortgage Bankers Association said.

Total applications were, however, at one of the highest levels seen since early June, with borrowers still eager to take advantage of the government's first-time home buyer tax credit incentive before the program expires at the end of November.

(Reporting by Lucia Mutikani; Additional reporting by Doug Palmer in Washington and Lynn Adler in New York; Editing by Andrea Ricci)