By Eric Morath 

WASHINGTON--The U.S. trade deficit narrowed in May, reflecting resurgent demand for American products overseas and fewer barrels of oil flowing into the country.

But trade will likely remain a headwind to U.S. economic growth in the second quarter partly because foreign imports outside of petroleum reached a record high in May. Imports subtract from domestic output.

The trade deficit shrank 5.6% to a seasonally adjusted $44.39 billion in May from April, the Commerce Department said Thursday. Exports increased 1.0% to $195.46 billion, the highest level on record. Imports fell 0.3% to $239.85 billion.

The latest figures led forecasting firm Macroeconomic Advisers to lower its estimate of second-quarter growth by 0.6 percentage point to an annualized 2.7%. The firm had expected imports to contract more after relatively strong gains earlier in the spring.

"Domestic spending on imported goods and services was more than we thought," said Ben Herzon, senior economist at Macroeconomic Advisers. The data suggests resilient underlying demand on the part of American businesses and consumers, but means expansion in gross domestic product will remain sluggish as the economic recovery enters its sixth year.

The economy contracted at a 2.9% pace in the first quarter. If the second-quarter reading, due out later this month, comes in below 3% growth, the economy will have significantly sputtered in the first-half of the year, diminishing hopes for a breakout performance in 2014.

A weak GDP reading would stand in contrast to June employment numbers that show one of the best five-month stretches of job creation since the late 1990s. Typically hiring supports consumer spending and broader economic gains. But any significant economic acceleration appears to now be on hold at least until the second-half of the year. Second-quarter forecasts are running only slightly ahead of the 2.4% pace averaged from mid-2009 through the end of last year.

One key driver of the first-quarter contraction was weak exports. The May data showed an uptick after exports largely had held flat since last fall. Exports of cars and consumer goods hit record during the month.

Thursday's data showed signs that demand is accelerating in two of America's largest export markets, Europe and China, where weak growth has hobbled the U.S. and global recoveries. Exports to the European Union were up nearly 4% in May, on a non-seasonally adjusted basis, driven by a surge in buying from the U.K., the Netherlands, Spain and Ireland.

Sales to China, where economists fear growth could continue to decelerate, were up more than 2% to $9.2 billion.

U.S. "exports will increase as most of the global economy expands, in large part due to positive, albeit still-weak growth in Europe," said Gus Faucher, senior economist at PNC Financial Services Group.

Petroleum played a large role in narrowing the May deficit.

By one measure petroleum imports touched an 18-year low. Average daily imports of crude oil, 6.9 million barrels, were the lowest since March 1996. Meanwhile, U.S. petroleum exports hit the highest level of 2014.

When excluding petroleum, the trade gap expanded.

"This indicates that trade will be a drag on the economy again in the second quarter, which weakens the argument for a rebound in GDP," said Steven Ricchiuto, chief economist at Mizuho Financial Group.

Ian Talley contributed to this article.

Write to Eric Morath at eric.morath@wsj.com

Gap (NYSE:GPS)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more Gap Charts.
Gap (NYSE:GPS)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more Gap Charts.