MANILA, JAN. 12 -- Philippine President Corazon Aquino, who late last year appeared in danger of being overthrown or forced to resign, seems to have weathered most challenges to her government and is consolidating her power, according to foreign diplomats, local analysts and opposition politicians.

Political observers here agreed that for the moment Aquino appears to have successfully defused discontent within the military while leaving her political foes in disarray.

Even ex-president Ferdinand Marcos seems less able than before to destabilize Aquino's government from his Hawaiian exile. Marcos' military supporters have been neutralized and his most prominent political backers in his native Ilocos region are running for local offices in next week's election with the endorsement of Aquino's ruling party.

Although the election campaign, like previous ones, has been fraught with violence, opposition leaders said Aquino's overall political standing has not been affected.

{The military reported Monday that three more candidates had been killed, bringing to 61 the number of people killed since the election campaign began Dec. 1. Five visiting U.S. senators said Tuesday that the escalating violence raised concerns about security for the two large American military bases here, United Press International reported. "The election assassinations are deplorable," Sen. Howell Heflin (D-Ala.) said.}

Even Aquino's most vocal critics seem to assume that she will finish her term and talk of the post-Aquino era following the next presidential elections in 1992.

"It no longer pays to fight Cory Aquino politically," conceded opposition leader Blas Ople, once one of the president's most outspoken critics. "People have concluded that someone up there is supporting her in her shaky throne."

"Everyone was saying she will not last through 1987," said Aquino's brother-in-law Paul Aquino, president of the Nation's Strength coalition. "Now it is an accepted fact that she will be there until '92. She is now president, and no longer a housewife-turned-president."

One western diplomat cautioned, however, that "it looks better on the surface, and the immediate future looks better than it did -- but she's not out of the woods yet. The deep-seated problems still remain."

Much of the new view of Aquino is a matter of perception. But in Philippine politics, perception often matters more than reality.

"The surface view is important because if she is perceived to be stronger, then her opponents are less likely to move against her," said one informed Asian diplomat. "In that sense, I guess the situation is now more stable."

Most analysts agreed that the view of Aquino has changed mainly because of several events last month. First was the capture of renegade coup leader Col. Gregorio (Gringo) Honasan, and second was the successful staging of the meeting of the region's noncommunist Southeast Asian leaders. An additional factor, they said, was an impressive 5 percent growth rate for the year.

In addition, Aquino has moved in recent weeks to address some of the military grievances articulated by Honasan during and after the August coup attempt, including the military's perception that her approach toward the communist insurgency is too soft. In public remarks, Aquino has taken a hard line toward the insurgents, rejecting new communist feelers for another cease-fire.

The new view of Aquino as a stronger leader is perhaps most evident in the alliances that have formed for the local elections scheduled for Monday. In many instances, long-time critics are now running as Aquino's supporters, some even as candidates of the official ruling party.

The election alliances have been engineered by Aquino's brother, Rep. Jose (Peping) Cojuangco, who has emerged as the country's premier power broker.

As head of the Philippine Democratic Party, he has been behind the local alliances with some warlords and provincial power brokers closely identified with Marcos.

Aquino came to power through a popular revolt, but she lacked a true political base. Many here see Cojuangco's latest efforts as an attempt to use Aquino's popularity to make the Philippine Democratic Party the country's dominant political machine, much in the mold of Marcos' once formidable New Society Movement, known by its Philippine abbreviation, KBL.

The growing power of Cojuangco and the Philippine Democratic Party has created a backlash from the other parties within the broad-based coalition that swept Aquino to power in February 1986, particularly the Liberal Party headed by Senate President Jovito Salonga. Salonga and the Liberals are fielding their own slate of candidates for the local elections, in many areas directly challenging the administration's candidates.

In a press conference earlier this week, Salonga accused Cojuangco and Paul Aquino of trying to establish an Aquino-Cojuangco political dynasty.

Salonga also criticized Cojuangco's practice of co-opting ex-followers of Marcos and allowing them to run under the label of the Philippine Democratic Party. That practice has led several high-level party members, including Senate speaker pro tempore Teofisto Guingona, to abandon the party and formally join Salonga's Liberal Party.