Over the past month, three of South America's traditionally least stable countries began the transition from military rule to democratically elected government. Two of the three, Peru and Ecuador, seem to be on course while the third, Bolivia, has demonstrated once again that it is an unpredictable country always about one step removed from political chaos.

In less than two weeks, Bolivia has undergone a political upheaval that began July 9 when the country held its first elections in 12 years. The upheaval ended for the moment Friday night when Juan Pereda Asbun emerged as president at the end of a day during which five active or retired generals served briefly as Bolivia's chief of state.

The result of the confusing situationwas that Pereda, the man selected by the military to be its official candidate in the election two weeks ago and who asked that the election results be annulled because of allegations of massive fraud, took the reins of power at the head of yet another unelected, military regime.

Forthe Carter administration, which has been intimately involved in encouraging and cajoling each of the military regimes to return their countries to civilian rule, the situation in Bolivia is particularly sensitive because it was in that country that the United States applied the strongest pressure and hoped to achieve the most striking results.

In the American view, Bolivia, which lies at the center of the South American continent and which has had more than 180 coups and revolutions in its 150-year history as an independent nation, was to serve as an example for other military regimes in Chile, Paraguay, Argentina and Urguay that have resisted the administration's wishes that they begin the transition back to elected government

The United States made it clear to the Bolivians that they could expect substantial increases in economic aid if their election was fair and honest and if the military respected the public will and allowed whoever was elected president to take office.

The U.S. ambassador in La Paz,Paul Boeker, stopped signing new aid requests a month ago as a warning that a rigged election or a refusal to respect the results would jeopardize U.S. assistance to Bolivia, which receives the most aid from Washington of any country in the Western Hemisphere!

Despite this carrot and stick approach, which was used more successfully by the administration in Peru and Ecuador, the Bolivian militaryregime, headed for the last seven years until last Fridayby President Hugo Banzer, apparently decided either that the United States was not serious about cutting off aid or that no amount of money was worth allowing anyone but the military government's official candidate, Juan Pereda Asburn, to win the election.

The Banzer regime, which controlled the election machinery, went all out for Pereda.Two teams of international observers - one headed by Lord Avebury of Britain and the other sent by the Organization of American States - fanned out across mountainous and desperately poor Bolivia on election day, cataloguing numerous irregularities and eventually crying fraud.

The State Department issued a strong statement expressing its concern about the allegations. Despite all the military's help, Pereda barely received the necessary 50 per cent vote that kept the election from being decided by congress

The military feared that a vote in congress might have resulted in the election of Hernan Siles Zuazo, who came in second in the polling at the head of a center - left coalition of political parties including the Bolivian Communist Party.

Siles and the two other leading opposition candidates, Victor Paz Estenssoro and Raul Bernal, had pledged themselves not to join forces with Pereda's allies in the congress in order to give the government candidateenough votes to be elected president.

U.S. diplomats looked in vain for some compromise that might have satisfied the Bolivian military, which never wanted anyone else but Pereda to be president, and the opposition, which believed the election had been stolen and which controlled enough of Bolivia's labor unions and peasants, to cause substantial trouble outside the government buildings in La Paz.

Although the Carter administration had hoped that after seven years of relative economic prosperity and political stability under the Banzer government, Bolivia was more stable and politically mature than its history would have indicated, events of the past two weeks demonstrate that Bolivian governments in power, whether they be civilian or military, still find it impossible to transfer power peacefully to their opponents.

Although the prognosis for Peru and Ecuador looks better, it remains to be seen what will happen in these two countries as well.

In Peru, where the military government of President Francisco Morales Bermudez allowed a constituent assembly to be elected June 18 as a first step toward a promised transfer of full power back to elected civilians in 1980, anti-military centrist and leftist political parties gained a majority of the seats in the new assembly, which will write a new constitution.

In Ecuador, where the military has been in power since 1972, the government of Admiral Alfredo Poveda tried to manipulate last Sinday's presidential election in favor of Sixto Duran, a conservative. They did so by passing a law several months ago making it impossible for Assad Bucaram, a populist and popular former mayor of Guayaquil, to run for office.

Nontheless, Bucaram put up his son-in-law, Jaime Roldos, who swamped Duran and four other candidates in the election. A run-off election will be held later this year between Roldos and Duran but it appears that Roldos will win if the election is fair, according to the opinion of most Ecuadorians and diplomatic observers in Quito.

The military here in Ecuador has pledged itself to respecting the results of that election although, as in Peru and Bolivia, nothing is certain until it happens.