By a unanimous bipartisan vote, a House Foreign Affairs subcommittee approved legislation yesterday to halt direct U.S. aid to the Philippine government until "a legitimate government" is established in that country.

The subcommittee on Asian and Pacific affairs took the first concrete step toward penalizing Philippine President Ferdinand Marcos for election fraud despite testimony from State and Defense department officials requesting a delay until U.S. special envoy Philip C. Habib returns from his mission to Manila.

Subcommittee Chairman Stephen J. Solarz (D-N.Y.) said no final action will be taken by the full Foreign Affairs Committee until there is a chance to hear from Habib, probably early next week. Solarz and several other lawmakers said quick action was necessary to "send a signal" that the United States is not supporting Marcos at a time when the political future of the former U.S. colony hangs in the balance.

In a television interview broadcast last night, Sen. David F. Durenberger (R-Minn.), chairman of the Senate Select Committee on Intelligence, said the Habib mission to Manila is "about the transition" to a post-Marcos government. "There's no way for Marcos to stay in power," Durenberger said, predicting that Habib would return to Washington "and give the president [Reagan] some advice on how quickly he needs to act and what kind of action he needs to take." If Marcos does not make the decision to leave office, "only Ronald Reagan can make it," Durenberger said.

Particularly notable in the House Foreign Affairs subcommittee's 9-to-0 tally was the vote of Rep. Gerald B. Solomon (R-N.Y.), one of the strongest congressional supporters of the Marcos government as "a bastion against communism" in the Far East. Despite his past positions, Solomon said, "We can't condone what happened in the Philippines in this election."

In another sign of growing external pressure on Marcos, European diplomats in Manila said yesterday they might boycott Marcos' scheduled swearing-in ceremony next Tuesday.

The House measure would place unobligated U.S. military aid in a trust fund account and channel all U.S. economic and humanitarian aid through the Roman Catholic Church and other nongovernment organizations until President Reagan can certify "that a legitimate government has been established in the Philippines which commands the support of the people of the Philippines" and Congress approves the presidential determination.

This year the United States is giving Manila $181.2 million in economic and humanitarian aid and $54.7 million in military assistance.

The bill declares that the Marcos government "has lost its legitimacy in the eyes of its own people" as a result of fraud in the recent election and that further U.S. aid under present circumstances "would alienate the Filipino people from the United States and thereby compromise our long-term political and strategic interests in that country."

Solarz announced before the vote that Philippine opposition party leader Corazon Aquino, contacted through an intermediary, said she supports the legislation "and feels it reflects her own view about how the United States can contribute to the restoration of democracy."

Assistant Secretary of State Paul Wolfowitz and Assistant Secretary of Defense Richard L. Armitage, who have been major figures in the formulation of administration policy toward the Philippines over many months, testified before the vote that Congress should not take "precipitous action" in view of the complex and fluid situation in Manila.

Both officials seemed to accept the subcommittee vote as a foregone conclusion, however, and there was no sign of administration lobbying to head it off.

Armitage, echoing concerns expressed Wednesday by Secretary of Defense Casper W. Weinberger, said that the military aid cutoff over time could endanger Philippine army operations against the communist New People's Army insurgency. The Pentagon official reported that NPA strength has grown to 20,000 armed guerrillas, compared to a 16,500-guerrilla estimate Armitage made before the same panel three months ago.

Last November, Armitage predicted a "strategic stalemate" between government and insurgent forces within three to five years if trends continued. Yesterday, he said in a written statement that "If the outcome of the election produces increased instability, the group of the NPA is bound to accelerate and a strategic stalemate would probably occur early in the 3-5 year period." He said there continues to be no evidence that the insurgency is receiving materiel from external sources.

Wolfowitz, in what may have been his last appearance before the subcommittee before becoming U.S. ambassador to Indonesia, said U.S. policy "has not been and must never become hostage to our interests in the bases" at Clark Field and Subic Bay in the Philippines." The U.S. stake in democracy "comes first" and complements the stake in the bases, he said.

While urging restraint by all parties in the Philippines, Wolfowitz seemed to go out of his way to criticize martial law, which Marcos has hinted may be his response to political unrest.

In his interview on the PBS program "Capital Journal," Durenberger said, "We are perfectly capable of defending our national security interests from places other than Clark and Subic, and the sooner we make that clear . . . the better off we'll be there and in other parts of southeast Asia."

On the same program, Sen. Sam Nunn (D-Ga.) said he understood from "private and governmental sources" that Aquino had won the election against Marcos "not by a close vote but by 60 to 70 percent."