The U.S. trade gap widened much more than expected in May as a jump in oil prices helped push imports to the second highest level on record and exports fell slightly from April's record high, a U.S. government report showed on Tuesday.

The trade deficit totaled $50.2 billion, the highest since October 2008, and well above the consensus estimate of $44.0 billion from Wall Street analysts surveyed before the report.

Imports rose 2.6 percent to $225.1 billion, the highest since the record of $231.6 billion set in July 2008 just before the global financial crisis took a huge toll on global trade.

The increase reflected record imports of capital goods and food, feeds and beverages in a sign of resurgent U.S. demand, but a jump in oil prices to $108.70 per barrel -- the highest since August 2008 -- also accounted for a large part of the gain.

The oil price jump helped push the U.S. petroleum trade deficit to the highest since October 2008. Imports from the Organization of the Petroleum Exporting Countries were also the highest since October 2008.

The wider-than-expected trade gap will likely prompt analysts to scale back their estimates of second-quarter economic growth, as imports captured more of stronger U.S. demand.

Exports put in another strong showing, but slipped 0.5 percent from the April record to $174.9 billion as shipments to the European Union, China and Newly Industrialized Countries all fell. Exports of capital goods were the highest on record.

President Barack Obama in 2010 set a goal of doubling exports in five years to help fuel economic growth and bring down the U.S. unemployment rate, which remains above 9 percent.

The politically sensitive trade gap with China jumped more than 15 percent to $25 billion. U.S. companies imported $32.8 billion of goods and services from the Asian powerhouse during May, but exported just $7.8 billion worth to that country.

In worrisome sign for U.S. exports to China in June, recent data out of Beijing shows the country's imports that month were the weakest in 20 months.

The wider trade gap with China could propel efforts in Congress to pass legislation aimed at pressuring Beijing to raise the value of its yuan currency, which critics charge is artificially weak against the dollar and gives Chinese exporters an unfair advantage.

(Reporting by Doug Palmer, Editing by Andrea Ricci)