President Carter said today that he is prepared to take legal action, if necessary, to prevent American athletes from competing in this summer's Olympic Games in Moscow.

Such measures may not be needed, however, since highly placed sources in the U.S. Olympic Committee (USOC) were predicting that the organization will vote this weekend to comply voluntarily with the president's insistence that the United States boycott the Games.

"If legal actions are necessary to enforce the decision not to send the team to Moscow, I will take them," the president declared during a speech to the American Society of Newspaper Editors in Washington. It was his most forceful defense to date of his call for a boycott to repudiate the Soviet Union for its invasion on Afghanistan.

This was the president's first acknowledgement that he is ready to invoke legal powers to keep American athletes out of the Games if the USOC votes to send a team to Moscow.

It followed by a day Attorney General Benjamin Civletti's remarks to the meeting of editors that the president has the authority, under the Emergency Powers Act, to bar the travel of any team, organization or group of two or more persons to any area in what he consider a time of national emergency.

The president's speech was interpreted as another firm message to the USOC, which has been under increasing pressure from the administration to reject its invitation to the Moscow Games.

Late today, the White House announced that, at Carter's direction, Vice President Mondale will fly to Colorado Springs Saturday and address the USOC's House of Delegates.

The delegates are meeting here this weekend, and will take up the emotional boycott issue Saturday morning.

The meeting is expected to be stormy and bitterly divided. But some of the most influential delegates, arriving here today, forecast that the USOC reluctantly will vote in favor of a boycott in order to avoid the dire financial consquences that almost certainly would result from defying the president and Congress.

Formal implementation of a decision to boycott the Moscow Games will probably be delayed and entrusted to the USOC's offices and 23-member Administrative Committee. They will try to arrange federal subsidies to cover a projected USOC budget deficit of more than $7 million, in return for a prompt rejection on the Moscow invitation.

"It looks like the administration is going to play hardball all the way, and we are going to have to knuckle under eventually," said one well-connected delegate, who asked not to be indentified. "Under the circumstances the only smart thing for us to do is to capitulate under the best possible terms for the USOC."

The deadline for entering the Games is May 24 and the USOC officers have said repeatedly that they would like to defer a final decision until that time, keeping their options open in case U.S. public opinion shifts against a boycott and prompts the president to change his mind.

The administration has made it clear that its decision against participation is "irrevocable," however. Now the president has indicated that he will preclude U.S. athletes from competing, regardless of what the USOC does.

The administration would still prefer that the USOC vote not to send a team to Moscow, and has urged the prompt and final decision an as indicator to other nations that it hopes to enlist in the boycott.

The administration -- concerned that the USOC might vote to defy the president, and embarrassment that could impede already lagging efforts to rally international support for a boycott -- intensified its lobbying of USOC officers and delegates over the last two weeks.

Carter sent telegrams to all delegates, stressing his conviction that American participation in Moscow is inconsistent with the national interest and security. USOC members were briefed by top White House and State Department officials.

The White House allegedly encouraged corporate contributions to withhold their pledges to the USOC unless it voted not to send a team to Moscow. Administration officials admitted discussing with congressional leaders the possibility of revoking the USOC's tax-exempt status if it failed to abide by the president's boycott decision.

The briefing apparently persuaded a number of delegates to vote for a boycott, but the strong-arm tactics, which USOC officers characterized as "out and out blackmail," appear to have created an anti-boycott backlash.

"Secretary of State Vance told us Tuesday that the administration had made a foreign policy decision that U.S. participation in the Games is against the national security interest. It's pretty hard to ignore that," said one delegate who came here after attending Tuesday's briefing in Washington.

"But then a lot of people who had decided to vote for the boycott were incensed by the threats and heavy-handed tactics. They said, "If we vote for a boycott now, it looks like we're caving in to this nasty pressure.'" He added, "That will make the vote much closer, but I'm sure we'll still abide by the president. If we do anything else our fund-raising will dry up completely and the USOC could be destroyed."

The president's speech today was seen here as the latest step in the administration's systematic tightening of the screws on the USOC.

Citing "striking parallels" between the 1980 Games and the 1936 Berlin Olympics, which Adolf Hitler uses as a propaganda vehicle to gain international acceptance after his invasion of the Rhineland, the president said, "It is extremely important that we not in any way condone Soviet aggression."