Prices paid to U.S. producers surged in August, driven by a sharp rise in gasoline prices, the government said on Friday in a report that showed wholesale prices in most other areas of the economy were muted. 

The Producer Price Index, a closely-watched gauge of inflation, rose 0.4 percent in August after falling 0.9 percent and 0.4 percent in July and June respectively, the Labor Department said. But excluding volatile food and energy components -- the core rate watched by the U.S. Federal Reserve to gauge underlying price pressures -- prices fell 0.1 percent after a 0.2 percent gain in July. 

Economists polled by Reuters had expected that producer prices would rise by a smaller 0.2 percent in August and had forecast a 0.1 percent rise in core prices. 

August's price gains, the largest since a 0.5 percent PPI advance in April, were driven by a 1.1 percent increase in the price of energy goods, which had fallen in July and June by 5.8 percent and 2.5 percent respectively. Within the energy category, gasoline prices jumped 8.7 percent after falling a massive 17.7 percent in July. 

The data collection for the report was not affected by the devastating air attacks earlier this week in New York and Washington.