A jump in auto and gasoline sales boosted U.S. retailers in June, while a measure of inflation soared by twice as much as expected, bolstering hopes the economy was finally beginning a modest recovery.

Commerce Department data on Tuesday showed sales at U.S. retailers rose 0.6 percent from a month earlier, ahead of economists' expectations for a 0.4 percent advance.

A separate report from the Labor Department showed producer prices jumped 1.8 percent last month, far outstripping forecasts for a 0.9 percent gain.

U.S. stock index futures stayed in positive territory after the economic data, but U.S. government debt prices extended losses. The euro held on to slender gains vs dollar, but the dollar extended gains against the yen.

Excluding autos and parts, which recorded a 2.3 percent gain, retail sales were up a more modest 0.3 percent, short of analysts' expectations for a 0.5 percent advance.

It's not horrible, but clearly there's not much of an acceleration, said Keith Hembre, chief economist at First American Funds in Minneapolis.

That reflects the ongoing weakness in income levels. It looks like gas and vehicle sales were really the big driver, accounting for just about all of the overall increase.

Gasoline stations showed strong gains, helped by rising prices. The average price per gallon of gas rose to $2.68 in June from $2.32 in May, according to government data.

Excluding both autos and gasoline, sales were down 0.2 percent, the fourth consecutive monthly decline. Department stores and restaurants were among the laggards, suggesting that consumers remained reluctant to resume discretionary spending despite signs the recession may be drawing to a close.

The Producer Price Index, which measures prices received by farms, factories and refineries, recorded its steepest gain since November 2007, the Labor Department said.

Core prices, which strip out volatile food and energy costs, rose a much greater-than-expected 0.5 percent, boosted by car and truck sales. Analysts polled by Reuters were looking for a 0.1 percent increase in the core PPI.

Energy prices rose 6.6 percent as gasoline costs surged 18.5 percent. Both were the biggest rises since November 2007.

Light truck prices rose 3.4 percent, the largest gain since November 2006, while passenger car prices increased 2 percent, the steepest rise since September of that year.

Compared with the same period last year, however, producer prices fell 4.6 percent.

(Additional reporting by Mark Felsenthal in Washington and Ryan Vlastelica in New York; Editing by Neil Stempleman)