The nation's mounting foreign trade deficit worsened again last month despite a decline in oil imports, the government reported yesterday, heightening concern about the deteriorating U.S. trade position.

The Commerce Department announced that imports exceeded exports in August by a near-record $2.67 billion - up from a $2.33 billion deficit recorded the previous month, and the 15th red-ink figure in a row.

Worse from the point of view of some experts, the increase came despite a slight dip in U.S. purchases of foreigh oil - raising questions about the Carter aasministration's contention that except for petroleum imports, the trade balance is essentially in good health.

Countenay M. Slater, the department's chief economist, said the worsening stemmed primarily from weaker-that-anticipated demand in European and Japanese economies, which have been performing below expectations.

Slater contended that despite the shift in the composition of the deficit, the red-ink figure for the year still is unlikely to exceed the $26 billion to $27 billion recently predicted for 1977 as a whole.

However, that alone would be more than four times the 1976 yearly deficit of $5.7 billion and the previous record of $6.4 billion aet in 1972. Only a few weeks ago, U.S. officials were predicting a $20 billion deficit.

Yesterday's figures appeared likely to give a new force to efforts by Carter administration officials to convince European and Japanese leaders at this week's International Monetary Fund meeting to stimulate their economics more rapidly.

The United States and other major industrial nations have been pressuring Japan, in particular, to take steps to reduce its huge surpluses in trade and balance of payments - implying, in part, acceptance of more imports.

The trade figures yesterday also sparked another decline in the value on the dollar, which fell to an all-time low on the dollar, which fell to an all-time low on the European currency markets. At the same time, the price of gold rose $2 an ounce.

Yesterday's report showed a moderate decline in imports, which dropped $244 million, or 2 per cent, from July's levels to $12.23 billion in August.

Oil imports alone fell $265 million to $3.33 billion, their second such monthly decline in a row. In July, the department reported petroleum purchases declined about $300 million.

At the same time, however, the figures showed export levels plunged by a sizable $587 million, bringing total U.S. sales abroad to $9.56 billion.

Moreover, the drop was widespread throughout several major sectors, indluding steel, coal, soybeans, grains, chemicals, motor vehicles, synthetic rosin and plastics and some machinery.

The August report brought the cumulative trade deficit for the first eight months of 1977 to an annual rate of $26.37 billion - a staggering figure by any standard.

Carter administration officials have predicted before that the deficit would taper off toward the end of the year. However, that forecast assumed that the economies of Europe and Japan would strengthen considerably.

The trade deficit has become a point of controversy over the past few ponths as domestic industries hurt by import competition have sought to use it as evidence that the nation is being treated unfairly overseas.

Exports have performed erratically over the past several months, rising sharply in May, declining in June and remaining stable in July, Meanwhile, imports have gained sharply and declined at times only moderately.