The U.S. trade deficit jumped 15 percent in May, reaching its highest level since October 2008 and prompting some economists to question whether international trade will continue to provide a boost to the economy in the second half of the year.

The shortfall, which reflects the difference between U.S. imports and exports, had been gradually narrowing over the first few months of the year, providing a welcome sign that American businesses were selling more abroad while fewer dollars were going toward foreign goods and services. In April, the deficit sank to its lowest level this year at $43.6 billion.

But fresh figures released Tuesday by the Commerce Department showed the trade deficit jumped to $50.2 billion in May, surprising economists who had forecast only a slight uptick to $44 billion. Most of the increase was due to imports, which rose $5.6 billion in May to $225.1 billion, with crude oil being the biggest single factor. Exports shrank $1 billion to $174.9 billion.

Despite the dip, exports “have been growing at a strong pace overall” in the first five months of 2011 — about 16.4 percent compared with the same period last year — Secretary of Commerce Gary Locke said in a statement.

Still, the May data “suggests that the domestic economy hardly grew at all” in the second quarter, said Paul Dales, senior U.S. economist at forecasting firm Capital Economics in Toronto. That’s because international trade accounted for almost all of the 2 percent to 2.5 percent growth in the U.S. economy during the quarter, according to his estimates.

Even that may not be sustainable. “It’s hard to see exports continuing to grow at an in­cred­ibly rapid pace,” Dales said. And if imports continue to rise — indicating more dollars are going abroad than are getting spent in the United States — trade could actually become a drag on the economy in the third quarter, he predicts.

China accounted for nearly half the U.S. trade deficit in May — $25 billion. That was up 16 percent from April’s figures, attributed to a jump in imports from China.

But rising imports aren’t necessarily bad, because they can indicate the overall direction of demand for goods and services. Some analysts see crude oil, which accounted for more than two-thirds of May’s increase in imports, as a positive read for the economy.

“It indicates demand is stronger,” said Linda Duessel, equity market strategist at Federated Investors in Pittsburgh. “That’s a good thing here in the U.S.”

With all eyes on the European debt crisis, though, the widening trade deficit had little impact on stock markets, which had been up slightly until a late-day downgrade of Irish bonds spooked investors. After tumbling 1.2 percent Monday, the Dow Jones industrial average finished Tuesday down 0.5 percent at 12,447. The Standard & Poor’s 500-stock index, a broader measure of the market, was down 0.4 percent. The Nasdaq, a more tech-heavy index, slid 0.7 percent.