Higher gasoline costs pushed up U.S. consumer prices in August while industrial output increased for a second consecutive month, according to data on Wednesday that reinforced hopes the economy was finally on the mend.

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.

Still, analysts said the risk of inflation remained low as the economy crawled out of its worst recession in 70 years, in part because stubbornly high unemployment is likely to keep labor costs down.

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.

A separate report from the Federal Reserve showed there was still a great deal of slack in the economy, which also supported the belief that inflation posed no near-term threat.

That is likely to encourage the Fed -- the U.S. central bank -- to keep its benchmark interest rate near zero for a long time to make certain the nascent recovery is sustainable. The Fed's policy-setting committee meets next week.

The Fed said the capacity utilization rate, a measure of slack in the economy, inched up to 69.6 percent but remained well below the 1972-to-2008 average of 80.9 percent.

Overall industrial production rose 0.8 percent in August, a touch stronger than the 0.6 percent advance that economists polled by Reuters had expected. The report also showed July's gain was revised up to 1 percent from the originally reported 0.5 percent.

Part of the increase reflected a ramp-up in auto making as the government's cash for clunkers sales incentive boosted demand. Utilities output also rose, reflecting warm weather.

CORE INFLATION TAME

On the inflation front, aside from rising energy costs, there was scant evidence of price pressures. Stripping out volatile energy and food prices, the core measure of consumer inflation rose 0.1 percent after rising 0.1 percent in July.

Prices for new vehicles fell 1.3 percent, the largest decline since October 1972, reflecting the incentives that gave discounts to buyers to trade in old gas-guzzling cars for new, fuel-efficient ones. The Labor Department said the program, which ended in August, could affect CPI data 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 watching consumer prices for signs of inflation pressures in the wake of massive efforts by the government and the Fed 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 deficit shrank in the second quarter to $98.8 billion, the lowest level 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.

Another report showed a big jump in capital outflows from the United States in July.

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 and Emily Kaiser; Additional reporting by Doug Palmer in Washington and Lynn Adler in New York; Editing by James Dalgleish)