President Reagan threatened Philippine President Ferdinand Marcos late yesterday with a cutoff of U.S. military aid as U.S. sources disclosed that the State Department was negotiating secretly with intermediaries close to Marcos on the possibility of flying him out of the Philippines in a U.S. Air Force plane.

Both the threatened aid cutoff and the offer to fly Marcos out of Manila -- to the United States or to a third country -- were intended as efforts to minimize possible bloodshed between contending Philippine factions, according to U.S. officials.

Reagan decided to threaten the military aid cutoff at an extraordinary Sunday afternoon National Security Council meeting where he received a report from special U.S. emissary Philip C. Habib, who had just returned from a week-long fact-finding mission. "Everyone agreed there is not much Marcos can do to hang on" to power for very long, said a participant in the meeting.

Yesterday's secret negotiations, conducted by the State Department, included an offer to Marcos to allow him to leave the Philippines without the United States making any connection between his departure and the results of the disputed presidential election that the White House has called flawed by serious fraud, sources said.

The United States told intermediaries in Manila that it would describe any decision President Marcos made to leave the Philippines as the statesmanlike act of a leader who sought to do the best thing for his people at a critical moment, the sources said. They compared the offer to the U.S. role in evacuating Haitian President Jean-Claude (Baby Doc) Duvalier to France on Feb. 7 in an Air Force C141 transport.

In a statement following yesterday's NSC meeting at the White House, spokesman Larry Speakes warned that use of force against breakaway military leaders would "cause untold damage" to U.S. relations with the Marcos regime. But Speakes said Reagan would not ask Marcos to step down because this is "not our prerogative" as outsiders.

The negotiations with persons close to Marcos were described as still pending when Marcos was shown on Philippine television last night declaring that he would stay on as president and threatened military action against breakaway military forces seeking his ouster.

At a White House dinner for the nation's governors last night, Reagan was asked if he would seek Marcos' resignation. "I have no comments on that," the president replied. He said he had "no plans" to call Marcos personally -- "maybe communicate through our ambassador there," Reagan added. Related story on Page D1.

A White House statement announcing Reagan's stand came as an abortive attack by Philippine Army troops loyal to Marcos against civilians standing vigil outside the headquarters of breakway military officers was getting under way in Manila. Participants in the White House meeting actually watched the beginnings of that operation on television as they deliberated.

A senior official said a decision to cut off U.S. aid was inevitable in case of major violence. Reagan stopped short of formally ordering an aid cutoff, an official said, because "we want to let the threat hang out there for a few hours." Soon afterward the military action by loyalist troops in Manila ceased, though there was no indication that the two events were related.

Reagan's decision was made in an 85-minute midafternoon meeting amid increasingly serious portents from Manila that Marcos' troops were preparing to attack the headquarters of Defense Minister Juan Ponce Enrile and the deputy chief of staff, Fidel C. Ramos.

Like a White House statement Saturday, Reagan's actions aligned the United States with the opponents of the embattled Marcos. Yesterday's statement said the military forces opposing Marcos "enjoy substantial popular backing."

Earlier in the day, Speakes announced, Reagan appealed to Marcos "to avoid an attack against other elements of the Philippine armed forces."

The spokesman said his public announcement, about 5:15 p.m. Washington time, was the first word to Marcos about the threat to cut off U.S. military aid.

Warning of the broad and serious consequences of an attack by Marcos' troops, the White House statement said "An attempt to resolve this situation by force would surely result in bloodshed and casualties, further polarize Philippine society and cause untold damage to the relationship between our governments."

At the same time, officials conceded privately that failure of Marcos to stop the mutiny of senior military leaders would cause his base of support to crumble and lead to his fall from power.

Reagan was under increasing pressure here yesterday to move openly against Marcos. Senate Foreign Relations Committee Chairman Richard G. Lugar (R-Ind.) publicly urged Reagan to telephone Marcos to ask for his resignation. Former presidents Gerald R. Ford and Jimmy Carter, among others, also said that Marcos should resign.

Asked if Reagan would offer Marcos safe haven in the United States if he steps down, Speakes said no such request had been made but did not discourage speculation along this line. Reagan will "do whatever he can for a peaceful resolution" of the situation, the spokesman said.

The administration has criticized Marcos' government for fraud that robbed the Feb. 7 national election of its value, but has refrained from saying that opposition leader Corazon Aquino is the legitimate leader of the Philippines.

How power could be passed -- and to whom -- if Marcos should step down remained a difficult and unanswered question being discussed by U.S. officials.

Speakes announced that Habib, who returned late Saturday night from a week of consultations in the Philippines, would be returning within the coming week for more discussions with the various factions there. There had been no previous indication that Habib's mission would be continued.

U.S. military aid to the Philippines this fiscal year totals $55 million, U.S. officials said, including $15 million in military sales. For 1987, Reagan had requested nearly twice as much -- $50 million in aid and another $50 million in sales.

The United States provides the military aid as part of an agreement with the Philippine government covering use of Clark Air Base and Subic Bay Naval Base.

The administration has previously opposed termination of military aid on grounds it could impair the effectiveness of the Philippine military's battle against the guerrillas.

Speakes said the United States was not contemplating a cutoff of the economic and humanitarian aid because it benefits the Philippine people.

Reagan returned from Camp David at midday yesterday and several hours later met at the White House with Vice President Bush, Secretary of State George P. Shultz, Secretary of Defense Caspar W. Weinberger, Treasury Secretary James A. Baker III, CIA director William J. Casey, White House chief of staff Donald T. Regan, national security affairs adviser John M. Poindexter, Marine Corps Commandant P.X. Kelley, representing the Joint Chiefs of Staff, and other officials.

Shultz proposed the threatened military aid cutoff during the meeting, and Weinberger concurred, according to a participant.

Staff writer Don Oberdorfer contributed to this report.