The Commerce Department said Tuesday that the trade deficit increased 0.2 percent from June's deficit of $41.9 billion.
U.S. exports fell 1 percent to $183.3 billion. Sales of autos, telecommunications equipment and heavy machinery all declined. Imports dropped 0.8 percent to $225.3 billion.
Economists note that the deficit would have grown much faster had it not been for a 6.5 percent drop in oil imports, largely reflecting cheaper global prices. Prices have increased since then, while demand for exports has dampened.
"It won't be long before the deficit widens more significantly as the global slowdown takes a greater toll on U.S. exports," said Paul Dales, senior U.S. economist at Capital Economics. Dales said trade will likely weigh on growth in the second half of the year.
A wider trade deficit acts as a drag on growth because the U.S. is typically spending more on imports while taking in less from the sales of American-made goods. U.S. growth slowed to a 1.7 percent annual rate in the April-June quarter, well below what is needed to accelerate a slackening job market.
Growth has also weakened around the globe, which has hurt sales of U.S. goods overseas.
Exports to Europe fell 11.7 percent in July from June. Many European countries are recession, which has cut demand for American-made goods. The region accounts for about one-fifth of U.S. exports.
Exports also fell in other big emerging economies. U.S. sales of goods to Brazil declined 4.4 percent. Exports to India dropped 1.2 percent.
The U.S. exported 0.4 percent more goods to China, the world's second largest economy. But the deficit with China grew 7.2 percent in July to $29.4 billion because U.S. imports from China jumped 5.6 percent.
Still, China's economy has weakened this year and may be worsening. On Monday, China reported that its imports from the rest of the world shrank in August.
In July, exports of American farm goods rose to all-time high. There were also gains in exports of commercial aircraft and electric generators. The gains were offset by declines in overseas sales of autos and auto parts and heavy machinery.
Further declines in exports could weigh on manufacturing and slow the ailing job market.
American employers added just 96,000 jobs last month, down from an increase of 141,000 jobs in July and well below the average 226,000 jobs a month created from January through March. Manufacturing, which has been one of the few bright spots in this recovery, lost 15,000 jobs in August.
While the overall unemployment rate fell to 8.1 percent from 8.3 percent in July, the improvement came only because many people gave up looking for work and therefore were not counted in the government's calculations.
The weak unemployment report has lifted expectations that the Federal Reserve will approve more help for the U.S. economy at their meeting this week.