Simon Bolivar, the man many South Americans consider the most famous in their history died 150 years ago in a small Columbian coastal city call Santa Marta, and for most of this year the nations that revere him have been preparing a commemoration that was going to be, as one Peruvian official put it, "euphoric."

Bolivar, the general who led northern South America's revolt from the Spanish crown, is called "The Liberator" here and his memory was to be honored at an unprecedented meeting of five democratically elected presidents. It was to be the first time in modern history that Ecuador, Peru, Columbia, Venezuela, and Bolivia were all simultaneously ruled by civilian, constitutional governments, rather than the military regimes all have known at various times in their histories.

The five countries have long been joined in an economic group called the Andean Pact. Now, in the name of The Liberator, with the military-run regimes of the southern part of the continent looking on, they would publicly affirm their new push for political as well as economic unity.

On July 17, the whole thing fell apart. Just before Hernan Siles Zuazo was to become the democratically elected president of Bolivia, the armed forces took over the Bolivian government. The self-delcared new chief executive, Gen. Luis Garcia Meza, told an Argentine newspaper that he expected to stay in power 20 years.

The good-natured preparations for the Santa Marta conference turned into an excruciating diplomatic two-step as the outraged democratic Pact countries, caught up in their zealous defense of constitutional elections, tried to figure out how to condemn a member nation they cannot afford to lose.

"It's terrible, terrible," said a troubled Ecuadorean diplomat. "You have to do mental gymnastics to pull this off."

Garcia Meza was not invited to the Santa Marta conference. The presidents of Mexico, Panama, the Dominican Republic, Costa Rica and the four democratic Pact countries were invited instead, as was the chief of state of Spain.

Although purists would argue that neither Mexico, where there is little doubt the ruling Institutional Revolutionary Party will continue its decades-long reign for many more years, nor Panama, where military strongmen Gen. Omar Torrigos had his handpicked candidate installed as president, are true representatives democracies, the Bolivian military clearly had gone too far.

Colombia's hosting foreign minister declared in a newspaper interview last month that the meeting was for democratic nations only and that it was Bolivia's problem if Bolivia wanted to scrap its democracy.

The Bolivian interior minister wrote a scathing reply in which he questioned the Colombian foreign minister's maturity, and Bolivia threatened to withdraw from the Pact.

Some Pact officials said they could not understand why Bolivia would want to attend the gathering since none of the member governments have officially recognized Garcia Meza's regime.

"Garcia Meza has no political finesse," one Pact advisor said with some irritation. "If I were Garcia Meza, and I knew there was going to be a Dec. 17 meeting where everybody hated me, I would suddenly discover that I had a very important appointment in the Philippines or something."

[On Dec. 10, Garcia Meza announced that he did not need to travel to Colombia to pay homage to Bolivar, and when the meeting opened in Santa Marta today, the country which bears The Libertor's name was conspicuously absent.]

In the Andean Pact, Bolivia is suddenly the nasty cousin that everybody hates but nobody wants to disown, and the reasons for that explains a lot about the uneasy tensions that now divide the South American continent. When the Andean Pact was formed 11 years ago, its purpose was really twofold: to link its member nations economically by dropping intercountry tariffs and developing joint trade and investment programs, and to form a bloc -- big, crowded, and potentially wealthy -- that could both negotiate internationally and counterbalance the massive economic power of the United States and -- in South America -- of Argentina and Brazil.

On the map of South America, a buffer zone of smaller nations -- Uruguay, Paraguay and Bolivia -- separates northern Argentina from southern Brazil. In Spanish those countries are called "tapones," or "bottle stoppers," and they are the most graphic symbol of some of the historic struggles for terrain and dominance in South American regional politics.

Brazil and Argentina, the territorial giants, are traditional rivals for continental power.Brazil is so big, so diverse and so populous that much of the continent sees it as a great hungry amoeba creeping into neighboring countries.

Argentina and Chile are fighting over control of Antartic waters and glare at each other over a lengthy shared border. Peru is still wounded from a 100-year-old war with Chile, in which it lost its southern province to Chile, and worries about its copper mines near the Chilean frontier.

In the last 15 years, however, a new kind of political division developed. First Brazil, then Chile, Uruguay and Argentina were taken over by military governments with stridently antileft "security doctrines." Paraguay has been ruled by strongman Gen. Alfredo Stroessner for more than a quarter century.

The northern tier of countries moved toward constitutional democracy -- first Colombia, then Venezuela, Ecuador and Peru, with Bolivia finally electing its own government last summer.

North and south have watched each other with increasing hostility. Each end of the continent -- military in the south and constitutional democracy in the north -- views the other as a threat to its political stability.

Bolivia lies right in the middle, with mineral riches, borders on five countries and a notoriously unstable political system -- less "tapon," in the traditional political imagery, than "corazon," or heart, of the continent.

Che Guevara came to Bolivia in the late 1960s because he thought winning its people was the first step to continent-wide revolution. Even as Argentina was denying widespread reports last summer that it helped carry out Garcia Meza's coup, officials in Buenos Aires said the democratic government of Siles Zuazo would have "harbored communists."

The regional political equation is, in large part, why the Andean Pact needs Bolivia. Bolivia's withdrawal would disrupt every completed or nearly completed agreement.

Industrial programs that allocate production of certain goods among the five countries, for example, would have to be renegotiated among the four. That is a bureaucratic nightmare but no great economic loss. Bolivia doesn't have much to offer in the way of products or consumers, just "factories nobody wants," and "debts it can't pay," according to one Pact official.

What the Pact wants is Bolivia's bulk, its weight in the continental balance. But the Pact is engaged in a fairly noisy campaign against precisely the sort of occurrence that just toppled Bolivia's democracy. The upshot now is that Andean officials who are asked about Bolivia tend to clear their throats and look as though they wished they were somewhere else as they come to the conclusion that, difficult as economic unity is, political unity is even harder to achieve.

"This whole problem started with Nicaragua," another Pact adviser said.

During Nicaragua's civil war in mid-1979, the five Pact members took what was their first joint political stand in announcing support for the Sandinista guerrillas.

But there is also a certain cynicism expressed by some about the future of democratic boosterism.

"The Pact isn't ready" to deal with a problem like Bolivia, said David Barbosa, a Colombian attorney and economist who served as Pact representative from 1970 to 1974. "If you want Bolivia in the Pact, you've got to accept the Bolivia [which has had nearly 200 governments, most of them military, in its 150 years of independence] is going to have military governments."