An across-the-board increase in exports and a decline in imports sharply reduced the nation's merchandise trade deficit in February, the Commerce Department reported yesterday.

The deficit narrowed from $5.440 billion in January to $3.146 billion last month, with most of the improvement coming in trade of manufactured goods. The usual large deficit in oil and petroleum products fell $126 million to $7.431 billion. The normal surplus in agricultural commodities fell by $201 million, to $2.085 billion.

The January merchandise trade deficit was the largest in 11 months, partly as a result of including the U.S. Virgin Islands' trade in the figures for the first time. The Virgin Islands import large quantities of crude oil for a major refinery there.

The value of exports does not include the cost of insurance and freight to the foreign buyers. By law, however, the value of imports must include such additional costs in this first release of each month's figures, which tends to make the trade deficit look larger. The department must wait two days before releasing import values on the same basis as exports.

Despite large monthly deficits in merchandise trade, the United States last year recorded a small surplus in its total trade and financial transactions with the rest of the world. Since the figures are reported only on a quarterly basis and therefore get less attention, the country usually has a large offsetting surplus in services and in receipts from direct investments in other nations.

Commerce Secretary Malcolm Baldrige, however, warned yesterday in speech to the Chicago World Trade Conference that the "international competitive position of the United States has steadily declined for more than two decades." Enactment of the administration's economic recovery program is "critically important" to improving that competitive position, he added. A copy of his remarks was released here.

Baldrige noted the recent improvement in the U.S. trade balance, with exports up more than 20 percent in the last two years, but he found little significance in that. "Good news like this leads some in Washington to believe we have turned the corner in our trade position and that international competitive position is and will be in good shape. I wish I could agree," he declared.

"The fact is that a great part of our recent trade improvement has stemmed from the lagging effects of the devaluation of the dollar, which cheapened our export prices, and from our recent sluggish economy, which reduced imports. Both of these are short-term developments, can be temporary and can change quickly," Baldrige said.

But to the extent a nation does gain a competitive edge with its products, the value of its currency may rise and offset part of its trade advantage. With floating exchange rates, it is extremely difficult for one country to maintain that sort of advantage, economists point out.

Last month's merchandise trade deficit with Japan shrank from $1,660 billion to $954 million. The deficit with the member nations of the Organization of Petroleum Exporting Countries declined from $4.229 billion in January to $3.605 billion.

At the same time, a $1.475 billion surplus was recorded with Western Europe. That total included a $230 million surplus with the United Kingdom and a $77 million surplus with West Germany. There was also a $2 million surplus with Canada, compared to an $869 million deficit the month before.