The gap between what Americans import and export unexpectedly widened in February as domestic demand rose for automobiles and fell back for crude oil.

The trade deficit grew 5.7 percent, to $62.3 billion, its highest reading since November and the second consecutive month of increases. The estimate for January was revised up to $59 billion from $58.2 billion, the Commerce Department said on Thursday.

The increase came as a surprise to economists who had expected the economic downturn to suppress domestic demand for foreign goods. Instead, import sales jumped 3.1 percent, the biggest gain in almost a year, to $213.7 billion from a revised $207.3 billion in January.

Americans bought up more foreign motor vehicles, pharmaceutical products and computer equipment in February. The appetite for foreign goods even outpaced the first decline in oil imports in nearly a year. Foreign petroleum sales dipped 1.6 percent in February, though the figure will probably climb back in March, when the price of crude oil reached a record high.