The pesky U.S. merchandise trade deficit dropped last year to $101 billion, its lowest level since 1983, the government reported yesterday. And the total would have dropped to $91 billion except for the sharp upward spurt in oil prices that followed Iraq's August invasion of Kuwait.

It was the third straight year that the trade deficit had declined from its record high in 1988 of $152.1 billion.

Commerce Secretary Robert A. Mosbacher hailed the trade numbers as a sign the United States was regaining its competitive edge, but the 1990 number still marks the seventh consecutive year that the deficit has been above $100 billion. The trade deficit was $19.5 billion in 1980. Three years later, the deficit was $52.4 billion.

Mosbacher pointed out that exports increased 8.3 percent in 1990 to an all-time high of $394 billion. Exports have been the most vibrant sector of the U.S. economy, accounting for 75 percent of last year's economic growth and preventing the country from sinking into a worse recession. Imports also increased, but only about 5 percent, to $495 billion.

Mosbacher said exports of manufactured products increased 9.7 percent while overseas sales in high technology items rose 11.9 percent. The United States has $34.1 billion trade surplus in sales of advanced-technology products, a $7 billion increase over the surpluses of the previous two years.

"Clearly, the economy would have been in worse shape if U.S. manufacturers had not been so successful in expanding their exports during the year," said William T. Archey, international vice president of the U.S. Chamber of Commerce.

Stephen Cooney, international investment director for the National Association of Manufacturers, said exports were "surprisingly strong" in the last three months of the year, particularly in big-ticket capital goods such as the machines used in factories.

The deficit with Japan remained the largest for the United States, although it dropped to $41.1 billion, its lowest level since 1984. Sales of U.S. products in Japan jumped by 9.2 percent, to $48.6 billion, while U.S. purchases of Japanese products declined for the first time since 1975, to $89.7 billion.

The United States showed its greatest improvement in its trade balance with Western Europe, which showed the first U.S. surplus since 1983. The surplus amounted to $4 billion, compared with a $1.6 billion deficit in 1989.

Willard Workman, director of international policy for the Chamber of Commerce, said the turnaround in the U.S. trade balance with Europe is "a direct result of increased U.S. investment" there in anticipation of the program to create a unified European market in 1992. That accounted for an increase of $12 billion in the exports of capital equipment to Europe, much of it used in equipping factories there owned by U.S. firms.

In December, the United States had a $6.3 billion deficit, $2.7 billion lower than the November imbalance. Both imports and exports decreased in December, imports by $3.4 billion and exports by $700 million.