The Soviet government formally condemned U.S. military actions in the Middle East today as a "gross" interference in the internal affairs of Egypt, and warned that it regarded Washington's strategy as a threat to Soviet security.

In a statement published by the Tass news agency, Moscow said that the United States should be aware that its actions after the assassination of Egyptian president Anwar Sadat have increased "the dangerous tension in the entire area."

The statement was delivered yesterday to the senior U.S. diplomat here, Warren Zimmermann, charge d'affaires at the U.S. Embassy.

The Soviet criticism came shortly after Secretary of State Alexander M. Haig Jr. disclosed in Cairo that the Reagan administration was planning to increase arms supplies to Egypt and that American forces, together with troops from Egypt and several Persian Gulf states, would conduct joint military exercises in the area during the next few months.

Earlier, the United States had ordered its warships closer to Egyptian coastal waters and placed Marine units in the Mediterranean on alert in a show of strength after Sadat's death.

"The government of the United States should be aware that its actions in connection with what happened in Egypt are not only unlawful but also increase the dangerous tension in the entire area," the Soviet statement said.

"The Soviet government resolutely condemns the U.S. attempts at interfering in any way in the internal affairs of the Arab republic of Egypt. What is happening around Egypt cannot but affect the interests of the Soviet Union's security, and it will attentively follow the development of events."

It was the first authoritative statement by Moscow on the situation in Egypt following the death of Sadat, and was regarded by foreign observers here as reflective of a Soviet effort to push the new Egyptian leadership off its pro-Western course.

Moscow regarded the departure of Sadat as an opportunity to reassert Soviet presence in the country it has always regarded as the key to the Middle East. Washington's vigorous attempts in recent days to shore up U.S. influence in the area have apparently prompted concerns here that the expected shift in Egyptian policies will not materialize.

The Soviet statement described U.S. actions as evidence of Washington's "gross pressure on a sovereign state," and called "inadmissible" statements by senior American officials on the situation in Egypt. It said these statements "are virtually made to order the Egyptians how they should act."

The statement said that no internal events in any country could justify such actions, which it described as "incompatible with the universally recognized norms of relations between states."

The U.S. policy, the statement said, was clearly "an attempt at gross diktat from the outside and showed disregard for a people's right to be the arbiter of its own destiny."

In Washington, State Department spokesman Anita Stockman called the charges "hogwash," The Associated Press reported. "We don't meddle in the internal affairs of sovereign countries," she said.