The Japanese government today expressed its unequivocal opposition to the country's participation in the Moscow Olympic Games.

The government's statement, delivered by Foreign Minister Saburo Okita, removed any doubts about the government's position, and was regarded as strong enough virtually to assure that Japan's teams, like those of the United States, would not go to Moscow.

While the Japanese Olympic Committee is still technically free to send teams, if it did so it would presumably be without the benefit of public funds provided through the Ministry of Education. The committee is scheduled to make a final decision May 21.

The Japanese announcement follows a decision by West Germany Monday calling on its Olympic committee to boycott the Moscow Games.

Okita, answering questions in the parliament, said it would be undersirable for Japanese athletes to take part in the Games this summer unless the Soviet Union withdraws its troops from Afghanistan.

He said that applied both to the Japanese Olympics Committee and to individual athletes who might want to go on their own.

In early February, the Japanese government had indicated it did not approve of the Olympic Committee sending teams to Moscow. In some quarters, that statement was viewed as ambiguous.

There has been sharp division in public opinion here on the question, and the national committee has persistently said it wants to attend. Some members of parliament have contended that Japan would be buckling under to American pressure if it joined the boycott movement.

A major factor in strengthening the government's opposition was the overwhelming vote in the U.S. Olympic Committee to Boycott the Games. The margin of the vote surprised many here, and Prime Minister Masayoshi Ohira said it would have a major impact on the Games.

Katsuji Shibata, chairman of the national committee, had called the USOC decision unexpected and said it was regarded as a "serious new development."

Before today's pronouncement, Shibata had said that his committee would continue to assess public opinion before making any final decision at a meeting on May 21. There was no comment tonight from the committee.

Government officials said they doubted that the committee would force a showdown with the government. That could involve cutting off public funds for the teams.

There have been some indications that Japan's wrestling team might try to circumvent the government's instructions and attend the Games as individuals. Leaders of the Japanese Amatuer Wrestling Association have started a campaign to raise the needed funds. They have said Japanese wrestlers might pick up as many as six gold metals this year.

Okita carefully phrased his reply today to discourage independent attendance of individual athletes. Participation, he said, would be undesirable both for the Japanese Olympic Committee and for "individuals."

He told a parliamentary questioner that the problem had arisen because of the Soviet military intervention in Afghanistan. It would be solved, he said, if the Soviet troops were withdrawn before the Olympics.

If the government had not joined the boycott move, Ohira would have been placed in an awkward position when he goes to the United States for a state visit on May 1.

President Carter has made the boycott a kind of loyalty test for allied support and the talks with Ohira could have been distinctly cool unless Japan had joined the boycott.

Kenzo Kono, chairman of the Japanese Amateur Sports Association, has insisted Japan's athletes should go regardless of American interests. Kono, a former president of the parliament's upper house, assured the Soviet ambassador here two weeks ago that public opinion favored Japan's attendance.

Public opinion has been divided on the issue, according to several polls, but the majority seems to approve of Japan's attendance.

A recent poll by the Asahi newspapers found that 55 percent of those questioned opposed the American-sponsored boycott while only 22 percent approved. The rest were undecided.