A jump in imports of consumer goods and other products widened the U.S. trade gap in February to $39.7 billion, but the closely watched bilateral deficit with China was its lowest in nearly a year, a government report showed on Tuesday.

Stronger U.S. demand boosted imports 1.7 percent during the month to $182.9 billion. Exports edged only 0.2 percent higher to $143.2 billion, but that was still the best showing since the depths of the global financial crisis in October 2008.

Analysts had expected the trade deficit to widen in February to around $38.5 billion. The Commerce Department lowered its estimate of January's gap slightly to $37.0 billion.

U.S. imports of consumer goods such as pharmaceuticals, electronics, toys and clothing and foreign services such as travel were the highest since October 2008. Imports of industrial supplies and materials were the highest since November 2008.

Imports from China fell 7.2 percent in February to $23.4 billion, the lowest since May 2009, and the U.S. trade gap with the Asian manufacturing giant narrowed to $16.5 billion, the lowest since March 2009.

The slimmer deficit could give President Barack Obama additional time to persuade China to raise the value of its currency before U.S. lawmakers make good on a threat to pass legislation threatening Beijing with additional U.S. tariffs.

Chinese President Hu Jintao, who is in Washington to attend a nuclear security summit, told Obama on Monday that China would not be pushed by external pressure to revalue the yuan and be guided instead by its own domestic needs.

But Hu also pledged China will firmly stick to a path of reforming the yuan's exchange rate mechanism, according to the official Chinese news agency Xinhua's account of Obama and Hu's meeting.

China's own monthly data on Monday showed it ran a $7.24 billion trade deficit in March, the first time its balance had been in the red since April 2004.

U.S. imports of crude oil in February were the lowest since February 1999. The average price for imported oil fell nearly a dollar to $72.92 per barrel from January, but was up 85.9 percent from February last year.

(Reporting by Doug Palmer, Editing by Andrea Ricci)