The election defeat of Nicaraguan President Daniel Ortega and his Sandinista government signals the end of U.S. involvement in a decade-long civil war that, with its toll of an estimated 30,000 Nicaraguan deaths, became the most bitterly divisive foreign policy issue of the 1980s.

The outpouring of anti-Sandinista sentiment registered in Nicaragua's ballot boxes appears to have accomplished overnight what President Ronald Reagan was unable to do in almost eight years of using the Tennessee-sized Central American country as a laboratory to test the idea of fighting Marxist governments with guerrilla proxies.

For the Bush administration, the unexpected victory of opposition candidate Violeta Chamorro removes one problem while creating another -- how to provide sufficient aid and trade to allow the bankrupt new government to prosper, and how to finally disband the thousands-strong contra army that Washington helped create. President Bush yesterday hailed the election results as "a clear mandate for peace and democracy" and began consultations aimed at lifting U.S. economic sanctions. {Details, Page A16.}

Reagan's support for the contras, whom he called "the moral equivalent of the Founding Fathers," was the key to what became known as the "Reagan doctrine." It pitted his passionate defense of the rebels against the Vietnam-inspired fears of many in Congress of direct U.S. military involvement in Central America. Other policy opponents simply disagreed with Reagan's assessment of the nature of the Soviet-backed Sandinistas and of the threat they posed to U.S. security.

The result was a seesaw battle between Congress and the executive branch over contra aid. The administration's insistence on keeping the contra war going, despite congressional aid cutoffs, eventually embroiled the Reagan White House in the ongoing scandal of the move to divert funds from secret arms sales to Iran to aid the contras.

To escape the fallout from the Iran-contra affair, Bush, in one of his first acts after becoming president last year, agreed with congressional leaders to redirect Nicaragua policy toward diplomatic and political solutions. While it frequently seemed that the administration was acting more from necessity than conviction, the policy change appears, in hindsight, to have been a big factor in setting the stage for what happened in Sunday's balloting.

The voters' decision ended a chapter of Nicaraguan, and American, history that began in July 1979 when Sandinista guerrillas ousted Anastasio Somoza after nearly 50 years of family dictatorship. While the U.S. right wing charged that the Sandinistas were Marxists, President Jimmy Carter offered aid and decided to wait and see whether the new government would move into the orbit of Cuba and the Soviet Union.

Carter's gingerly but relatively open-minded dealings with the Sandinistas gave way to undisguised hostility when Reagan assumed the presidency in January 1981. Within a month, the Reagan administration ended U.S. aid. It accused the Sandinistas of supporting leftist guerrillas in neighboring El Salvador and of threatening U.S. security.

In a demonstration of its implacable attitude, the administration purged the State Department of diplomats who had counseled Carter to take a flexible approach toward Nicaragua and who continued to argue that there was not clear-cut evidence that the Sandinistas were seeking to subvert the region. They were replaced by policy-makers and ambassadors chosen for their willingness to follow an unequivocal anti-Sandinista line.

Initially, the Reagan administration's campaign against Nicaragua consisted largely of rhetorical attacks. For much of his first term, the thrust of Reagan's Central America policy was focused on El Salvador, where the administration's efforts to keep aid flowing to the military's anti-guerrilla campaign was in constant danger from congressional concern about right-wing human-rights abuses.

However, as early as 1980, the guerrillas calling themselves contras -- from a contraction of the Spanish word for counterrevolutionaries -- had started operating in Nicaragua with the help of Argentina's rightist military regime. Gradually the Argentine advisers gave way to sponsorship by the Central Intelligence Agency, and by 1983, the United States was supplying the contras with a small but steadily increasing stream of arms and helping them with such harassing tactics as planting mines in Nicaraguan harbors.

In May 1984, Jose Napoleon Duarte, whose democratic record made him a favorite of Congress, was elected president of El Salvador, and the administration was free to turn its attention to Nicaragua. After weighing and rejecting such ideas as a naval blockade or surgical strikes on Nicaraguan targets, Reagan and his advisers decided to expand considerably the contras' ability to wage guerrilla war against the Sandinistas.

Reagan's calls for more contra arms aid led to emotionally wrenching battles that from 1985 to 1988 saw an uncertain Congress reject administration appeals for more funds and then reverse itself, voting to give Reagan what he wanted.

On Nov. 25, 1986, Reagan's attorney general, Edwin Meese III, revealed that a National Security Council aide, Marine Lt. Col. Oliver L. North, had tried to circumvent the difficulty of dealing with Congress by secretly diverting funds from the sale of arms to Iran. Once the plan was disclosed, however, the ensuing furor tipped the scales toward an inevitable shutdown of lethal aid to the contras.

The way to abandonment of the "Reagan doctrine" and a peaceful solution was a plan sponsored by Costa Rican President Oscar Arias and signed by the five Central American presidents on Aug. 7, 1987. The Reagan administration treated the peace plan with barely disguised contempt, but congressional Democrats, arguing that it should be given a chance, voted in February 1988 to cut off arms aid to the contras and give them only nonlethal assistance.

By the time Bush was elected later that year, it was clear that contra arms aid would not be resumed. During the transition, Bush's secretary of state-designate, James A. Baker III, began the negotiations with Congress that resulted in bipartisan agreement to seek change in Nicaragua by peaceful means.

The principal methods were to persuade the Soviet Union, Managua's chief financial patron, to put pressure on the Sandinistas and to urge the other Central American governments to demand greater liberalization within Nicaragua. The effect was to force the Sandinistas to grant the political opposition enough space for a relatively free election, and on Sunday the Nicaraguan populace took advantage of it.

----- SELECTED EVENTS SINCE 1979 -----

1979: Sandinistas lead a revolution that overthrows right-wing dictator Anastasio Somoza.

1981: Reagan administration accuses Sandinistas of arming Marxist rebels in El Salvador and suspends aid to Nicaragua.

1982: U.S.-backed contra rebels launch raids into Nicaragua from Honduras signalling the start of a war that will claim 30,000 lives in eight years.

1983: Contras launch their first major offensive, blowing up two key bridges. Sandinistas impose emergency law suspending many individual freedoms.

1984: CIA role in mining of Nicaraguan harbors creates international row. In November, in first general elections since revolution, junta member Daniel Ortega is elected president with two-thirds of the vote following opposition pullout.

1985: U.S.-Nicaraguan talks collapse. President Ronald Reagan imposes new trade sanctions and Congress approves $27 million in non-lethal aid to the contras.

1986: Iran-contra affair begins with disclosure that Reagan administration officials sold arms to Iran and diverted profits to the contras.

1987: Costa Rican President Oscar Arias proposes a peace plan designed to end conflicts in Nicaragua, El Salvador and Guatemala. He is awarded the Nobel Peace Prize. The five Central American presidents sign the plan in August.

February 1988: Congress suspends military aid to the contras.

March 1988: Nicaraguan government and contras agree to 60-day cease-fire starting April 1. Talks on a permanent peace break down in June but both sides say they will refrain from offensive operations.

February 1989: Central American presidents sign peace accord under which Sandinistas agree to political reforms and early elections in exchange for commitment to draw up plan to disband the contras within 90 days.

April 1989: Congress approves $50 million in non-lethal aid to the contras and agrees to continue the aid until elections are held.

August 1989: Central American presidents announce accord on disbanding contra camps in Honduras under international supervision by early December.

September 1989: Violeta Chamorro, publisher of opposition La Prensa newspaper, is chosen as presidential candidate of recently formed opposition alliance, the National Opposition Union (UNO).

December 1989: Deadline for contra demobilization passes without action. Central American presidents call for U.S. funds for the contras to be used for demobilization. Election campaign begins.

Dec. 10, 1989: One person is killed, more than 20 injured, when violence breaks out after UNO rally south of Managua. Political parties later agree to step up policing and prevent violence.

Sunday: Elections for president, vice president, legislators and local council members are scrutinized by about 2,500 international observers, who generally call them free and fair.

Yesterday: Chamorro claims victory in the presidential race and calls for national reconciliation. Ortega concedes defeat and says he will step down in April. President Bush praises the election process, welcomes Chamorro's win, and calls for prompt renewal of cease-fire.

SOURCE: Reuter