The Reagan administration, which helped ease an old ally out of power in the Philippines to avoid bloodshed, has taken a different approach with another close friend, President Samuel K. Doe of Liberia.

Like Ferdinand Marcos, Doe, a military officer, was prodded by the administration into holding elections to legitimize his rule and to obtain the continued blessing -- and considerable aid -- of the United States.

As in the Philippines, the strategy backfired. Doe reportedly "fixed" the elections in his favor just as Marcos apparently did. Congress reacted by demanding that the administration suspend military aid to Liberia -- as it did after the disputed presidential election in the Philippines.

The administration, faced with nearly identical situations in two countries that are historically close to the United States, took a different tact in Liberia, however.

It has continued to back Doe, disregarded the nonbinding congressional resolutions in both houses of Congress and plans to continue providing aid, albeit a reduced amount -- $65.4 million for economic assistance and $4.7 million in military aid this fiscal year, down from $81 million and $12 million last year.

The reasons for this quirk in U.S. policy provides an insight into the rationale for the occasional blatant inconsistencies in the making of foreign policy.

The Oct. 15 Liberian elections initially turned against Doe, according to various reports including private U.S. Embassy accounts. Doe delayed the count, set up a special election commission loaded with his friends and after two weeks was declared the winner -- by a narrow 50.9 percent of the vote. (Marcos "won" with 53.8 percent.)

Part of the opposition was so upset that it attempted a coup d'etat Nov. 12 that failed and ended in bloody recriminations.

As in the Philippines, the widely disputed Liberian elections and subsequent abortive coup left the administration in a quandry. Liberia, founded by freed American slaves in 1847, has the same emotional attachments to the United States as the Philippines, America's only former colony. In both countries, the opposition has closely watched Washington's reaction.

After much soul-searching, the administration policy decision was "to go with Doe," in the words of one congressional source. Assistant Secretary of State Chester A. Crocker, who acknowledged in congressional testimony Jan. 23 that "serious questions" remained about the election count, provided a rationale for the decsion.

Doe, Crocker said, "seems to have the power to govern." He maintained the loyalty of enough military units to overcome the Nov. 12 coup attempt and still had some popular support. He had made some attempt at national reconciliation since the coup, and a multiparty system was still in place.

In addition, the administration's "best assessment" was that another coup attempt "would be even more bloody than the last one," unleashing "protracted political violence" and "serious ideological cleavages" in Liberian society, Crocker said.

"We believe there is reason to keep trying to work with President Doe's government to make the premise of Liberia's Second Republic succeed," Crocker concluded.

Outside analysts offered a more cynical analysis of the administration's decision. The Liberian elections, noted two congressional aides, were "not exactly a hotly debated issue in this town" as were those in the Philippines. Neither Congress nor the news media focused on them because "U.S. strategic interests were not that great" in Liberia, they added.

"Doe stole the election, but the Liberian people were too afraid to protest," added one aide. "In Liberia, Doe got away with it."