WASHINGTON- The U.S. trade deficit held at a record high in February as both exports and imports surged, indicating that trade remained a drag on economic growth in the first quarter.

The report from the Commerce Department on Tuesday added to recent data that showed a moderation in consumer and business spending in suggesting the economy slowed considerably last quarter amid high inflation triggered by shortages.

The trade deficit dipped 0.1% to $89.2 billion in February. Data for December was revised to show a $89.2 billion shortfall, still an all-time high, instead of the previously reported $89.7 billion. Economists polled by Reuters had forecast a $88.5 billion deficit.

Exports of goods and services shot up 1.8% to a record $228.6 billion in February. They were boosted by a 1.8% jump in goods exports, which also hit an all-time high. Petroleum exports hit a record high of $20.3 billion. The increase was likely driven by higher oil prices following Russia's invasion of Ukraine.

"Russia's invasion of Ukraine has caused global oil prices to jump and this will affect the nominal U.S. trade deficit in March," said Ryan Sweet, a senior economist at Moody's Analytics in West Chester, Pennsylvania.

Exports of consumer goods exports rose $1.3 billion, with pharmaceutical preparations increasing $1.5 billion. But capital goods exports dropped $0.7 billion, pulled down by a $1.0 billion decline in civilian aircraft.

Exports to Ukraine hit a record high, likely reflecting shipments of military equipment after Russia launched its invasion on Feb. 24.

Exports of services increased $1.3 billion to $69.9 billion, lifted by a $1.2 billion rise in travel amid a significant decline in COVID-19 infections.

Imports of goods and services jumped 1.3% to an all-time high of $317.8 billion. Imports of goods gained 0.6% to a record $266.2 billion. Imports of industrial supplies and materials rose $3.4 billion to the highest level since June 2011.

They were fueled by a $1.9 billion surge in crude oil, which averaged $76.37 per barrel, the highest since November 2014.

Imports of both capital and consumer goods hit record highs. But imports of motor vehicle, parts and engines fell $3.2 billion. Imports of services rose $2.4 billion to $51.6 billion, reflecting increases in charges for the use of intellectual property, transport and travel.

The surge in imports is being driven by businesses rebuilding inventories, the main driver of gross domestic product growth in the fourth quarter.

"While much of the strength of imports appears to reflect inventory rebuilding, which would normally provide an offsetting boost to growth, the record-setting pace of restocking at the end of last year means that inventories also look set to be an additional drag in the first quarter," said Andrew Hunter, a senior U.S. economist at Capital Economics.

When adjusted for inflation, the goods trade deficit decreased $1.6 billion to $116.3 billion in February. Trade has subtracted from gross domestic product growth for six straight quarters.

Growth estimates for the first quarter range from as low as a 0.4% annualized rate to as high as a 2.8% pace. The economy grew at a 6.9% pace in the fourth quarter.

(Reporting by Lucia Mutikani; Editing by Andrew Heavens and Paul Simao)