In June, Jorge Ramirez spirited the last of his four children out of Nicaragua. He lives alone now in a large, nearly empty house, its roof left half-finished since the 1979 Sandinista revolution.

Yellowed copies of the opposition newspaper La Prensa cover the tattered upholstery of his sparse living room furniture. A miniature American flag, from the Fourth of July party at the U.S. Embassy, sits on the bare dining table.

And on the faded wall hangs a picture of Jesus kneeling in prayer, with the passage, "Lord, discover my solitude so that I may join you in the salvation of the world."

Ramirez is part of the political opposition in Nicaragua, small, splintered groups that were the target of a recent crackdown by the Sandinista government. But he is also part of a reduced community of middle- and upper-class Nicaraguans who, despite nine years of socialist revolution, continue to live and work inside the country.

Hundreds Stayed Behind

The vast majority of Nicaragua is poor, and most of the nation's well-to-do landowners, professionals and businessmen abandoned it after the Sandinistas came to power. Nevertheless, unlike what happened in Fidel Castro's Cuban revolution, hundreds of upper- and middle-class families are believed to have stayed behind.

Many stayed in Nicaragua because they supported the revolution and have assumed prominent roles in the government. Others, like Ramirez, stay out of what they say is a political determination to fight the Sandinistas peacefully from within. Many could not afford to start over in another country.

Still others have managed to stay and function on the margin of politics; money and family connections ease the way for many.

Life outside the Sandinista system can be a lonely challenge. Many of those who remain seek to maintain a kind of life style or set of values that is long gone or runs counter to revolutionary goals. And many do whatever they can to insulate themselves from Sandinista influence and the U.S.-backed guerrilla war.

They send their children to other countries, or put them in the private American School, for a U.S.-style education. Many are members of Casa de Espana, the last private country club. They go to the same churches and visit each other at home for company.

For most who remain and are not Sandinistas, recent measures taken by the government were alarming and sent new waves of uncertainty into lives that are already on delicate footing. In recent weeks, Sandinista authorities used unusual force to break up a protest march, arrested dozens of political opponents, expelled the American ambassador, suspended two opposition media outlets--La Prensa, which has been allowed to resume publication, and Radio Catolica--and nationalized the largest private company in the country.

Ramirez, 55, who is a lawyer, is convinced that the Sandinista government wants to phase out its middle-class opposition altogether.

"It is not in the government's interest that we are here," he said. "But I am not discouraged. We feel energy, a desire to fight against all odds."

Clientele Reduced

Ramirez said, however, that the system that the Sandinistas are fostering inside Nicaragua has left little room for his profession, the practice of law. He spends the first three hours of every day in his house, which doubles as his office, waiting for customers who rarely arrive. His clientele has been reduced to one-tenth of what it was before the revolution, he said.

The rest of his day is dedicated to his political activities as secretary general and vice president of the opposition Nicaraguan Liberal Party (PALI), which was formed 2 1/2 years ago but is still awaiting formal legal recognition.

"Sometimes I feel like I'm touching a world that is slipping from my hands. You feel a certain solitude, a certain sadness," Ramirez said. "We'd like to see a happy Nicaragua, with our children, a Nicaragua that is a home."

Ramirez's wife and three of his children left Nicaragua during the last two years and live in San Jose, Calif. To spare his fourth and last son from mandatory service in the Sandinista army, Ramirez said, he escorted the young man to the Honduran border last month and waded waist-deep across a river to get him out of the country.

The party that Ramirez represents is one of 14 that had been negotiating with the Sandinistas as part of a peace plan signed by Central America's five presidents last year. "If the Sandinistas haven't complied by now, they never will," he said.

Fifteen days after Mayela de Frixione finished building her two-story house in the rolling hills south of Managua, the Sandinistas declared the area a military zone.

For the next seven years, she said, her house became a kind of trapped oasis, a civilian outpost in the middle of houses occupied by military officers and advisers.

"They assumed I would give up and abandon the house," Frixione said. "We didn't. No one could believe they let us stay."

Finally, a deal was struck, Frixione said, and the government bought the house, paying with a new Toyota utility vehicle and $7,000 in cordobas.

Frixione is an example of middle-class business entrepreneurs who, despite their feelings about the Sandinistas, have managed so far to coexist with Sandinista rule.

Since the times of deposed dictator Anastasio Somoza, Frixione, 36, and her husband have owned and operated the El Infinito discotheque.

"The entertainment business has had a real boom since the revolution. Monday, Tuesday, Wednesday . . . even Sunday, people are in here dancing, dining out," she said. "It's a way for people to escape. They spend what they have because there's no sense in saving. And there's a lot of alcoholism."

But the role of a private business owner in Nicaragua is fraught with difficulties. Frixione complained of unfair competition with restaurants that are co-owned by the state. Because the government controls foreign exchange and imports and exports, the other businesses are favored, she said.

Frixione was graduating from the state Nicaraguan Autonomous University back in 1979. She had noticed students around her joining clandestine activities that would eventually become a revolution, but she did not participate.

She and her family have tried to remain on the sidelines of public politics, though she admits such a feat is nearly impossible, given the Sandinistas' domination of so many aspects of daily life.

"To live here is to be political," she said. "You are always watching how the pieces are moved on the playing board. It's a little game."

As part of the Sandinistas' crackdown on political opponents in mid-July, the government also confiscated the country's largest business, the San Antonio sugar refinery. Owners of the refinery, members of one of Nicaragua's wealthiest families, had generally been cooperative with the government, and the fact that even they were targeted worries Frixione.

"Everyone's turn comes sooner or later; I'm just waiting mine," said Frixione, who saw the government take over her father's cattle ranch two years ago.

"Right now, we have no reason to leave. Nicaragua is my country. But when they (the Sandinistas) come to touch me, or my son, or my husband, then I will go."

In the meantime, Frixione works to isolate her young son and two daughters from Sandinista influence. She controls what they watch on state-run television, teaches them religion at home and sends them to the American School.

It was a typical Sunday afternoon, around dusk. Horacio Guzman and his wife, Amalia, were visiting with Nini Lacayo, who had stopped in from her coffee ranch down by Jinotepe, 26 miles south of Managua. The major discussion of the afternoon was whether to sip their American whiskeys on the white wicker furniture inside, or to go to an outdoor patio where it might rain.

"Our group of friends is getting smaller, and it's always the same people," Amalia Guzman said. "Before the revolution, we'd have big dinner parties, 100 guests, or spend the weekend at the country club. Now the only time we all get together is at someone's funeral."

Horacio Guzman was manager of the Nicaraguan branch of the Bank of America when the Sandinistas came to power and nationalized the banking system. Guzman resigned.

The Guzmans continued to live in a sprawling hacienda in the faded gentility that is Granada, 25 miles southeast of Managua, for several years after the Sandinista takeover. But as war intensified, it became more difficult to get medical care in Granada, so the Guzmans moved to their current residence, a smaller but graceful house on a hillside in a Managua suburb.

They live comfortably, traveling to the United States or Europe several times a year.

Like many Nicaraguans, the Guzmans have seen their family divided over the revolution. One son is a high-ranking Sandinista official in the Interior Ministry, another is a Houston cardiologist.

It appears to be the filial tie to the Sandinistas that affords the Guzmans certain protection and security. They have "accommodated" to the revolution, they say.

But life has changed for them.

Both Amalia Guzman and Nini Lacayo remember the old ease with which you could buy food. Now, they say, if you invite dinner guests there is a panic about whether you can find enough chicken to serve. Maids, too, used to be easier to come by. And now, Amalia Guzman complains, there is certain class hatred that is new.

"The revolution is a different life, a different world," Amalia Guzman said. "My private standards in my house are the same, but when I go out, I have to wait in line like everybody else."