When President Ferdinand Marcos called last November for an early presidential election, he saw an opportunity to restore his government's sagging credibility and get a new mandate for his 20-year rule at the expense of a weak and divided political opposition.

His moderate foes, believing him to be unpopular and sensing a widespread desire for change, saw a rare chance to topple him in the first genuine presidential election in nearly 17 years. They decided to make the most of it and surprised Marcos by forging a united ticket.

Now, with vote counting limping along following Friday's election, which has been marred by widespread charges of fraud, and with both sides disputing who is the winner, Marcos' credibility seems to have reached a record low. His opponents, some members of the military and some members of his ruling party, are more disillusioned than ever with his methods of remaining in power at all costs behind a facade of democracy.

"The only winners in this whole thing are the insurgents," a western diplomat said. He was referring to the guerrillas of the New People's Army, the armed wing of the Communist Party of the Philippines.

"If Marcos prevails, the NPA will go on a rampage and have unspoken support from the opposition," said a military intelligence officer. He described the military as "partly demoralized" by the election, with disillusionment particularly strong among reformist junior officers. He estimated that about 1,000 of the approximately 15,000 officers in the armed forces are active in the Reform AFP Movement, also known as We Belong, and that thousands of others are sympathizers.

In fact, to the dismay of U.S. officials, the Philippine government appears to be in worse shape than before Marcos called the election. That move came largely in response to mounting U.S. pressure on the president to adopt sweeping economic, political and military reforms seen in Washington as vital to counter the escalating insurgency.

Not only has the election campaign set back those reforms and drained government coffers, political observers said, but the massive fraud that marred Marcos' reelection bid has denied him anything resembling a new mandate.

"Calling the election was one of the biggest mistakes of his career," a senior diplomat said. "Now he's in a worse position to deal with any of the country's problems."

"This is a pyrrhic victory on his part if it's a victory at all," said an opposition campaigner who said he believed Marcos will eventually succeed in "stealing" the election. The same sentiment was expressed by a Marcos campaign official who said he was appalled by the extent of electoral fraud, violence and intimidation.

The view that the insurgents and their leftist allies are the main winners in the current election mess appears to be widely shared among opposition activists and even some alienated military officers and members of Marcos' ruling New Society Movement. Unless the party has badly miscalculated the number of votes it needed to buy, steal or strong-arm to win the election, these sources said, Marcos is almost certain to be proclaimed the winner by the Batasang Pambansa, or National Assembly, which he controls with a two-thirds majority.

The expectation that the Communist rebels will emerge in a stronger position after the election is based on the widespread perception that Marcos is the best recruiter for the NPA. The organization, founded in 1969, has grown from fewer than 100 fighters in a province of Luzon island to an estimated 16,000 well organized guerrillas active in most of the country's 74 provinces.

Although Communist Party cadres have tried to build an ideological foundation for the guerrilla force, opposition and Roman Catholic Church sources said it thrives esentially on anti-Marcos sentiments.

Now, the charges of rampant cheating in the election allow the Communists to argue with more authority that the only way to remove Marcos is through armed struggle. The Commmunists also benefit by having, so far, accurately predicted the outcome of the election, which they boycotted on grounds it would be a sham contest marked by massive fraud and intimidation.

Whether more moderates are drifting to the left is not yet clear, although opposition, diplomatic and military sources noted a growing polarization between the Marcos camp and the legal opposition.

U.S. officials here said Washington appears not to have realized how polarized the situation has become as a result of what are seen here as dirty tactics in the election campaign and an even dirtier election. All this has made the Philippine opposition suspicious of talk from Reagan admnistration officials and congressmen about "working together" and "reconciliation."

For starters, Marcos was opposed in the election by a woman who accused him of having ordered the murder of her husband. Corazon Aquino, the widow of assassinated opposition leader Benigno Aquino, clearly surprised Marcos -- and the Reagan administration -- by emerging as the strongest challenger he has ever faced.

In a contest that one Marcos associate dubbed "the housewife versus the Hun," the widow with no previous political experience united the badly fractured opposition behind her candidacy. She generated a strong grass-roots following through a grueling schedule of campaign trips despite a virtual blackout by government-controlled media, particularly television.

Aquino gained the enthusiastic support of the Philippine business community, which resents what many businessmen consider the favoritism that has enriched Marcos' friends and relatives through an economic policy known as "crony capitalism."

Without a restoration of business confidence, Marcos is given little chance of reinvigorating a shrinking economy.

[An International Monetary Fund team expected in Manila next week to review the country's economic performance has postponed the visit, a spokesman for Prime Minister Cesar Virata said Wednesday, according to Reuter. The Philippines has yet to draw the $230 million remaining from $688 million in standby loans.]