President Reagan said yesterday that the Philippine presidential election was "flawed by reports of fraud which we take seriously," and asked former Mideast special envoy Philip C. Habib to go to the Philippines "to assess the desires and needs" of the people.

The surprise announcement was a distinct step away from Reagan's statements Monday in which he played down reports of widespread fraud and seemed to be accepting a victory by President Ferdinand Marcos.

Yesterday's statement followed a morning meeting with the leaders of the official U.S. observer delegation to the election, Sen. Richard G. Lugar (R-Ind.) and Rep. John P. Murtha (D-Pa.).

Lugar said they told Reagan that Marcos "still has the power to allow a fair count," and that Reagan should withhold judgment on the validity of the balloting until a citizens' watchdog group completes its tally. State Department officials said the count might finish Thursday or Friday.

At his news conference last night, Reagan repeated his concern about "the possibility of fraud," adding that "it could have been that all of that was occurring on both sides" and that there is no hard evidence of fraud.

He also said "we're concerned about the violence that was evident there."

Reagan continued that he was "encouraged by the fact that it is evident that there is a two-party system in the Philippines." He said several times in response to questions that he would withhold any final judgment on the election until the outcome is final.

Asked if the two major U.S. military bases in the Philippines are "of paramount importance" in any debate on American policy toward the island republic, Reagan indicated that he thought they were.

"One cannot minimize the importance of those bases, not only to us, but to the Western world and certainly to the Philippines themselves" in light of the growth of Soviet naval power, the president said. He added that "I don't know of any other U.S. naval base overseas that's more important than the bases in the Philippines."

In his earlier announcement, Reagan said of the election: "First, it is a disturbing fact that the election has been flawed by reports of fraud which we take seriously, and by violence.

"This concerns us," he continued, because the Philippines needs "an authentic popular mandate" to counter a guerrilla insurgency and combat economic troubles.

On Monday, Reagan focused in an interview with The Washington Post on maintaining the United States' historic relationship with the Philippines, and when asked about fraud reports, said that "even in elections in our own country there are some evidences of fraud in places and areas."

Reagan's second point yesterday was in praise of "the obvious enthusiasm of Filipinos for the democratic process and . . . the vigor of the underlying forces of pluralism and democracy."

"Our task for the future is to help nurture the hopes and possibilities of democracy, to help the people of the Philippines overcome the grave problems their country faces and to continue to work for essential reforms," he said.

Habib, 65, will "help advise me on how the United States can best pursue that task," Reagan said. He said Habib would meet with political leaders from both sides as well as church, government and private-sector representatives.

Habib, a veteran diplomat regarded as a tough and articulate negotiator, is familiar with the Philippines, having served as assistant secretary of state for East Asia and the Pacific from 1974 to 1976. He was the State Department's top career Foreign Service officer as undersecretary for political affairs from 1976 to 1978, and was named Reagan's troubleshooter in the Middle East in 1981.

It was at his recommendation that U.S. Marines were sent to Lebanon in 1982.

There was no indication when Habib might depart for the Philippines or how long he would stay, but he is scheduled to meet with Reagan today. A senior State Department official said the mission was intended in part to buy time "and to put force behind the idea that the situation cannot be helped by a flawed election."

There is still some question on details of the alleged fraud, he said, and a great desire to avoid a cut in U.S. aid to the Philippines at a time when need for it is paramount. Habib also will try to keep the United States from becoming the focal point in Marcos' decisions or in any violence, the official said.

Several members of the observer delegation said Habib's trip and Reagan's new statement accurately reflected their recommendations.

"The president did not have the benefit of our report and the observations of our group" when he made his Monday remarks, said Sen. Thad Cochran (R-Miss.). "He does now. This is much better."

Cochran said he had been "very disappointed" by irregularities in the election process above the precinct level. Voters and precinct workers "were betrayed by people who tried to manipulate the system for their own selfish purposes," he said. "It's a tragedy."

Murtha told a news conference that Reagan's Monday remarks had been "premature."

Jack H. Brier, the Republican secretary of state in Kansas and a member of the delegation, said Habib's trip would "continue to put pressure on the government for a fair count, and that's exactly the right pressure."

At the news conference following their meeting with Reagan, Lugar and Murtha said they did not want to say anything that Marcos might use as a reason to invalidate the election. Marcos said last weekend that he had "thought seriously" about declaring Friday's balloting invalid because of fraud reports, but added the next day that he had no plans to do so. Such a move would leave him in power until his term expires in 1987.

"We're not going to make any comments that President Marcos or anybody else could use," Lugar said. Invalidating the election would be "arbitrary and capricious," he said, and would sorely test the patience of the Filipinos.

Lugar said he thought Marcos' challenger, Corazon Aquino, was more cheated than Marcos by reported fraud because the government is handling the official count.

Lugar noted that Namfrel, the citizens' poll-watching group, had negotiated a contract with the government vote-counting body, Comelec, to be its "eyes and ears," but that Comelec "had been effective in stopping [Namfrel's] count" by not making registrars available to validate Namfrel's tallies.

"They were gone. The result was that there were almost no results from Manila," Lugar said, adding that Namfrel and opposition observers were "kicked out of" five provinces holding 25 percent of the vote. "The number of persons disenfranchised was fairly large," he said. "The election is not over," Lugar continued. He called for "a reconciliation" of the Namfrel and Comelec counts.

Sen. John F. Kerry (D-Mass.) warned at a separate news conference against U.S. efforts "to broker an outcome" in the Philippines that its people would see as an effort to help Marcos. "In so doing, we will be linked as a significant recruiter for the insurrection," he said.

Rep. Robert L. Livingston Jr. (R-La.), another commission member, agreed with the general findings. He said fraud "was not overwhelming, not so broad that returns would have to be declared totally invalid." Echoing some State Department officials, he said, "I became skeptical of everyone's claims," including those of Namfrel, which he called "very partisan for the opposition" to Marcos.

On the other hand, Livingston said, the halting of the tally was "a panic move, a mistake" by Marcos when "he saw a much closer election than he had anticipated."