At least two groups of Nicaraguan exiles, each claiming thousands of counterrevolutionary troops inside their homeland, along with training camps and the support of a majority of their countrymen, have set up clandestine headquarters here to plot the overthrow of Nicaragua's revolutionary Sandinista government.

Their leaders live in "safe houses" in Honduras and, they say, in Guatemala, sleeping in different places every night, spending their days organizing and plotting, training and arming.

It is difficult to gauge their real strength in this volatile part of the world, where the smallest spark could ignite a conflagration. But they already have provoked serious border confrontations between this country and their own. They claim, and Nicaraguan officials acknowledge, scores of attacks inside Nicaraguan territory. Their existence has been cited by the Sandinistas as justification for expanding their armed forces and training a projected 100,000-strong civilian militia.

Speaking in various international forums, the Sandinista government has described the counterrevolutionaries as "terrorists" and has denounced a series of "armed aggressions" against Nicaragua.

In interviews here, leaders of both of the counterrevolutionary groups spoke of armed and organized columns inside Nicaragua, ready to rise up and fight to the death against the current government. They spoke of hatred they contend most Nicaraguans now feel for the Sandinistas and of massive potential support for "liberators" if fighting begins in earnest.

Two decades ago, exiles from Fidel Castro's Club talked the same way these outcast Nicaraguans are talking now. Yet when they made their move in Cuba, there was no uprising, no popular support, and only humiliating defeat at the Bay of Pigs.

But that was then and this is now, say the Nicaraguan exiles. That was Cuba and this is Nicaragua and Ronald Reagan is in the White House, not John Kennedy, who authorized and backed the CIA-sponsored invasion of Cuba in 1961 but then refused to allow U.S. forces to save the invasion force.This time, before the end of the year, they insist, the counterrevolution will work.

The Reagan administration has cut off aid to Nicaragua but has given no indication of support for any intervention there.

While the two counterrevolutionary groups agree on the common Sandinista enemy and the common goal of overthrowing the Nicaraguan government, their movements are deeply antagonistic. One calls itself the Nicaraguan Democratic Union. Its members used to be Sandinista backers, and their current hatred for their former allies is equaled only by their disgust for the exiled members of the late, defeated dictator Anastasio Somoza's National Guard.

The second group, the National Liberation Army, is made up basically of the former guardsmen themselves.

A mattress covered the window onto the street to stop bombs or shots or the curious from looking in.

On a battered sofa beneath the blue-and-white flag of his country sat Edmundo Chamorro, a distinguished-looking, articulate man in his fifties, a cousin of assassinated Nicaraguan publisher and revolutionary martyr Pedro Joaquin Chamorro.

Weariness showed at the corners of his eyes. He has been fighting for so long: first inside the Nicaraguan Conservative Party, Somoza's traditional political opposition; then with a movement that tried to oust the dictator in the 1960s; then supporting the Sandinistas through 1978. But before Somoza's defeat in July 1979, Chamorro says, his group began to see the Sandinistas as the new enemy. So now he is in exile. Still organizing, still fighting.

He talks of the Nicaraguan national hero of the 1920s, Augusto Cesar Sandino, who fought the U.S. Marines then occupying the country and whose name the current rulers of Nicaragua took for their movement. "If Sandino were alive, he would be here fighting alongside us to throw the Cubans and Russians out of Nicaragua," Chamorro maintains. "He never wanted anything to do with communists.

"The people did not fight to submit themselves to the imperialism of the Russians and the Cuban mercenaries who are in Nicaragua now. We suffered to fight Somoza. We are part of the revolution. The real counterrevolutionaires are those inside who betrayed the revolution," said Chamorro. "Our strategy is to organize inside Nicaragua the different groups who fought against Somoza and now see the aims of the revolution frustrated."

Chamorro claims that his group has organized cells of activists in every province and city of Nicaragua. The Democratic Movement's armed adjunct, the Nicaraguan Revolutionary Armed Forces, claims 2,000 fighters already inside the country, Chamorro said. Most of these, but not all, have weapons, he added.

Taking on the Sandinista army's estimated 30,000 to 50,000 regular soldiers and its militias is a formidable problem and one that would seem to require foreign backing.

"We don't close the door to that," said Chamorro. "This is not our struggle alone. We are not going to confront just a dictatorial government but one supported by other countries, by Cuba, Russia and even the Palestine Liberation Organization.

"We don't count on the government of Honduras or Guatemala or El Salvador [or the United States] giving us any support," Chamorro continued, "but when the real fighting begins these nations all around are going to have a moral responsibility to aid us."

Chamorro said he has been in contact with members of the Reagan administration to "inform them about the Nicaraguan situation." Recently a letter to Chamorro, alleged to have been written by National Security Council chief Richard Allen, was intercepted by Sandinistas and read in public as "proof" that the United States was backing the counterrevolutionaires, although its contents revealed nothing more than a polite response to an earlier letter from Chamorro.

The Sandinista government has sent Washington an official protest against what it says is the open existence of a number of Nicaraguan exile training camps in Florida and other states. Accounts of the camps have appeared in the U.S. media. The FBI has said it is looking into the situation.

Ultimately, Chamorro said, everything depends on the willingness of the Nicaraguans themselves to throw the Sandinistas out. He claims that 80 to 85 percent of the Nicaraguan population that two years ago almost unanimously supported the Sandinistas in the fight against Somoza now oppose them and are willing to fight to get rid of them.

A key to Chamorro's and others' calculations is the Nicaraguan economy, which is in a constant state of near bankruptcy. If, as anticipated, very little planting takes place this summer, then there could be serious shortages of basic foodstuffs -- rice, beans, corn, and meat.

"we believe that by September or October there will be a true crisis of food shortages, work shortages and discontent," said Chamorro.

Although they place the level of dissent much lower, Nicaraguan officials and diplomats from friendly governments acknowledge lessened support for the government, something Sandinista supporters claim is inevitable with any new government, especially one with little money.

According to Chamorro, there have already been spontaneous riots against the Sandinistas in the relatively isolated and mostly English-speaking Atlantic coast. In one incident at the town of Prinzapolka last month, Chamorro claimed, four Cubans and five Sandinistan were killed. A Sandinista source confirmed that there was an incident but would not confirm the casualties.

Chamorro says his supporters include members of Nicaragua's opposition political parties and, most importantly, the still influential private sector there. He carefully cites few names, and says that Alfonso Robelo, who resigned from the government to become the most prominent opposition leader, is not among his backers.

Jorge Salazar was, however, according to Chamorro. Salazar was a major business leader in Nicaragua, a softspoken but influential critic of the Sandinista government, who was killed by Sandinista security forces in a controversial incident late last year that exacerbated antagonism between the private sector and the Sandinistas.

"It is untrue what the Sandinistas say, that [Salazar] was linked to exguardsmen," said Chamorro. "He was with us."

On the subject of the exguardsmen, Chamorro is adamant.As a group they would never be tolerated no matter how badly their fighting skills might be needed. "The day we join with the ex-guardsmen," said Chamorro, "is the day the people of Nicaragua will unite in support of the Sandinistas."

The former captain in Anastasio Somoza's National Guard spoke with an intense, almost religious fervor. His scarred face and dark eyes, behind tinted glasses, were full of resolve.

"There are tiny groups that have been formed with the set purpose of disassociating themselves from the victorious advance of the National Liberation Army," said the captain, who called himself "Tupamaro." He smiled disparagingly and looked over to the bed of the little hotel room where a chain-smoking ex-major, "Reinato," sat with a Browning 9 mm pistol in his belt.

As far as these men were concerned, they were the only real hope for a "free" Nicaragua. They were the only ones who were really trained to fight, who have the money and organization, who know how to operate clandestinely.

Outside the door a former Guard lieutenant kept a lookout, his gun concealed in a plastic bag.

"The National Liberation Army has been building for 22 months," said Tupamaro, since the fall of Somoza.

"It was born as a necessity," said the ex-captain, "the necessity to return to our homeland. At the same time was born the figure of 'Juan Carlos,' . . . a young man, dynamic, brave, impetuous."

"Juan Carlos" has been labeled by the Sandinistas as Pedro Ortega, a middle-aged, Spanish-born naturalized Nicaraguan and successful businessman in the days of the Somoza government. He was not available for an interview, said Tupamaro, because he is inside Nicaragua organizing blows against the communists.

Juan Carlos was the inspiration and the creator of the National Liberation Army in the wake of the defeat of Somoza's Guard. Thousands of exguardsmen were rounded up and jailed by the Sandinistas. Others, discarding their uniforms in the streets and commandeering trucks and aircraft ahead of the advancing Sandinista forces, fled north into Honduras. About 3,000 remained in refugee camps until the Honduran government dispersed them after Nicaragua complained that the camps were being used as bases for counterrevolution. By then, many other ex-guardsmen had scattered over the hemisphere, to Guatemala, Argentina, Paraguay, and Miami.

Juan Carlos, using his own money according to Tupamaro, began pulling the young officers together, flying them to a series of meetings from wherever they had settled.

"He showed us the urgency of the needs that existed in our homeland -- for something to be done. He showed us that we would not find the luxury the Cubans had found in Miami," said the ex-captain. Nicaragua would have to be won back. "The National Liberation Army, headed by Juan Carlos, is conscious that the only language is that of arms."

Tupamaro laid out a strategy, an estimation of Nicaraguan discontent and potential support for counterrevolution, a litany of Sandinista abuses and foreign communist influence similar to that given by Chamorro.

But Tupamaro's claims for his group's direct military capabilities and organization were much more extensive. He said the National Liberation Army is now organized at the division level, equivalent to about 5,500 men, and has six armed columns operating inside the country making frequent contact with and frequently beating the Sandinista Army "at every point of the compass."

In addition, Tupamaro said, ther are "safe houses" scattered around Honduras and Guatemala where men who go to fight inside Nicaragua can leave their families and know they'll be secure. There are 600 soldiers just guarding the safe houses, Tupamaro said.

The ex-captain reached into a shoulder bag and pulled out photographs of two training camps, which he claimed were inside Nicaragua, one in the north-central region, the other on the Atlantic coast.

One picture showed a group of perhaps 50 shirtless men lined up for exercise in a clearing cut from dense tropical forest. In another photograph, a man held a captured Czechoslovak-make submachine gun beside a table laden with hunting rifles, shotguns and a few automatic assault rifles -- some of the National Liberation Army's arsenal.

Tupamaro said that his group is not receiving any direct international aid, but that there was widespread support for his organization throughout the area.

"In Mexico," Tupamaro said by way of example, "we have 600 men, Mexicans, ready to fight by our side." The Mexican government, however, has been strongly supportive of the Sandinistas.

International aid would help bring about the defeat of the Sandinistas more quickly, he said, and noted that the recent cutoff of U.S. aid to the Sandinista government was an important beginning. He said his group has no direct contact with the U.S. government but "we have encountered undoubted moral support in the statements of Ronald Reagan."

Asked why a people that fought so hard to overthrow Somoza and his National Guard would now welcome his soldiers back as saviors, these exguardsmen answer that it was Somoza who was hated, not them.

"When Somoza died" -- assassinated in Paraguay last year -- "automatically the symbol died that gave the Sandinistas their victory," said Tupamaro. "He was my chief. I respected him. I was with him for a time in Paraguay. But even if he were alive he could never have been the reason for the fight. . . . We need a new image."

"We are going to die in our land," said Tupamaro. "Maybe that sounds like fanaticism," he said, noting his own tone. "But it is not fanaticism, right? It is patriotism."