In December, the gap increased from November's $38.3 billion deficit to $40.6 billion, the bureau said.
U.S. exports of goods and services increased from $159.6 billion in November to $163 billion. Imports reached $203.5 billion, up from $196.8 billion in November.
The bureau said the monthly trade deficit with China shrank by $4.9 billion to $20.7 billion. The deficit with the Organization of Petroleum Exporting Countries rose for the second consecutive month, climbing from $7 billion to $8.3 billion.
The deficit also rose slightly in trades with Japan and Germany and increased sharply in trading with Canada, where the gap climbed from $1.7 billion to $3.9 billion. The surplus in trades with Hong Kong, Singapore and Egypt also grew.