Despite severe challenges to its leadership and policies, continued economic problems and the defection of many former allies, the core of Nicaragua's Sandinista leadership has remained intact and in many respects has increased its internal cohesion as it has tightened its control during nearly four years of governing.

The Reagan administration reportedly believes that wide-ranging economic and political pressure will bring an erosion of unity among the nine top Sandinista commanders and may be the most effective way to cause the regime's collapse.

But foreign observers and sources inside and close to the highest levels of government, as well as what little is publicly visible through the heavy veils of secrecy surrounding Sandinista decision making, indicate that the leaders appear to share the belief that divisions among them could endanger their rule. Unity has thus become inseparable from survival as a Sandanista priority.

At the same time, the pressure appears to have accelerated a hardening of Sandinista positions and defections of non-Sandinista officials who find less heed given to their counsel. Society has become more polarized, according to both pro- and anti-Sandinista Nicaraguans.

Non-Sandinista groups have become less interested in accommodation and more overtly opposed to the government, while increasing commitment to Sandinista rule is pledged by its central power bases among Nicaraguan youth and within the highly organized labor and peasant sectors. Among the nine members of the directorate of the ruling Sandinista National Liberation Front, sources said, decisions on all but the smallest matters increasingly are made in light of perceived national security imperatives that tend to favor the hardest line.

"In the face of U.S. hostility," said one former government official now in self-imposed exile, the political center of the nine "has shifted more sharply to the left."

Even if there is disagreement, "no one wants to stand up and argue" against any proposal that is described as necessary to counter the U.S. threat, whether it means tightening controls on local opposition or ignoring U.S. insistence that Nicaraguan support for rebels in neighboring El Salvador be curtailed.

A long-time Managua resident with close contacts among senior Sandinistas noted that "alliances have shifted somewhat at the top level" during the past several years, but "it's not the same kind of fight as it used to be" among those who were considered to favor Soviet, Cuban or Western European socialist lines in domestic or foreign policy.

As survival, rather than the fine points of ideology, has become the principal issue, maneuvering room has been perceived to shrink and arguments reportedly have become much less theoretical. The growing reality of outside threats, which once could be dismissed as radical rhetoric, has enhanced the credibility of the more radical versions of the extent and power of internal opposition and how to deal with it.

At the same time, most high-level officials outside the nine-man directorate who had criticized what they interpreted as growing Cuban influence over policy have left the government and in some cases have gone into active opposition in exile. Most prominent among early Sandinista activists are Eden Pastora, guerrilla hero and former deputy interior minister , economic strategist Alfredo Cesar and former junta member Arturo Cruz.

Others who have departed from the government, including early members of the junta Alfonso Robelo and Violeta Chamorro, had come late to active association with the guerrillas. They found that despite their membership in the junta--the highest government body--they had relatively little influence over policy, which is made by the nine leaders of the Sandinista Front.

The unity of the Sandinista Front's political leadership is relatively unusual among Latin American guerrilla organizations of the left, both in and out of power. The Cuban revolutionary government during the early l960s went through several years of contention and intrigue among various leftist and communist factions. Many observers of that process attribute the eventual internal solidity of the government to the overpowering and solitary figure of Fidel Castro and his elimination of all possible rivals.

No such prominent figure has emerged from the Sandinista nine. And, unlike the five-faction Salvadoran guerrilla movement, whose differences occasionally have erupted into internecine violence, the basic unity agreement, forged with Cuban help in March 1979 among the three Sandinista "tendencies" that the nine leaders represent, appears to have held.

Sources caution that there are exceptions to the general apperance of unanimity among the nine. A number of Sandinista leaders reportedly were angered when Defense Minister Humberto Ortega, one of the nine "commanders of the revolution" who make up the national directorate, said in response to a reporter's question two months ago that Nicaragua would study any Soviet proposal for the deployment of nuclear missiles here.

"Humberto provides a lot of journalistic scoops," said one senior official with visible irritation. Ortega's apparently offhand, or at least incautious response, immediately was seized upon by the Reagan administration, and sent the rest of the Sandinista leadership scurrying to deny that any such proposal had been made or would be considered.

According to several sources, the nine argued both about whether to arrest the leaders of Nicaragua's leading private business organization after it published a critical statement in the fall of 1981, and then again several months later over whether to release them from jail. They were eventually released.

Interior Minister Tomas Borge's attraction for personal publicity, which in the early days of the Sandinista government placed him regularly on television screens and newspapers around the world, reportedly irritated his colleagues. His visibility now appears to have decreased substantially.

Early disagreements over the pace of land confiscations and industrial expropriations that sometimes found one commander disapproving what another had approved the day before also appear to have largely ceased, although sources indicated that Agrarian Reform Minister Jaime Wheelock and Planning Minister Enrique Ruiz--thought to reflect Cuban and Soviet views respectively--continue vying for influence in economic policy making.

But such divisions, particularly if they involve ideological disagreements, rarely if ever appear publicly.

Less than a year before they seized power, the Sandinistas were sharply divided in three factions with different views on how to conduct a revolution, and on the pace and scope of change in Nicaraguan institutions and society under the revolutionary government they hoped to form. Although there was general agreement on the eventual goal of a socialist, workers' state, the guerrillas were riven by tactical disagreements and long-time personal feuds over style and leadership.

One faction called itself Prolongued Popular War. Led by Borge and Ruiz, who had studied in the Soviet Union, it represented the remnants of the original Sandinista force formed in the early 1960s along the lines of the popular Cuban model of the day. Its fighters operated in guerrilla outposts from mountain and jungle havens where for years they had hoped in vain to develop a substantial rebel army.

By the mid-1970s, that theory was under challenge as a failure throughout Latin America by Marxist theorists who, like Wheelock, believed that the road to real revolution would begin only with the increased political consciousness of the urban masses, led by a well-structured political party. Wheelock, a Nicaraguan who had lived in Chile during the leftist government of Salvador Allende, broke away to form the Proletarian faction.

A third group of Sandinistas, led by brothers Daniel and Humberto Ortega, both of whom had spent extensive time in Cuba, felt that the assumption of both theories that victory might still be years away was incorrect. By forming tactical alliances with other, more moderate, political and economic groups within the country, they argued that the time for revolution could be the present. They were named the Insurrectionalists, or the "Third Tendency."

Although the leaders all had come from the same Sandinista Front core, by the time the guerrilla ranks began to swell with new recruits in 1977 and 1978, the troops identified themselves as followers of an individual, and adherents to one of the three factions.

The unity agreement finally was signed, and the directorate institutionalized, after Castro counseled that the revolution would be won more quickly if the dissention was overcome, and the Insurrectionalist line of tactical alliances followed.

Once the Sandinistas came to power, they quickly moved to institutionalize their unity, while at the same time protecting the power of each of the three factions. Bases of power were divided among them. Insurrectionalists Daniel and Humberto Ortega became head of the administrative government junta and minister of defense respectively; Proletarian Wheelock was given the influential post as head of the land reform program; Prolongued War heads Borge and Ruiz became the ministers of interior and planning.

According to sources here, a similar, and perhaps more revealing, system eventually was set up internally among the nine. Three committees, each with one member from each of the three factions, were given oversight responsibilities for the economy, politics and defense. A representative of each faction holds the chair of a committee, while the other two members of each committee come from the other two factions.

When the nine meet, decisions reportedly are made by consensus under a chair that rotates regularly. While outside advisers or petitioners and other officials regularly attend discussion sessions of the directorate, sources here knew of no high-level decisions made in the presence of non-memebers of the directorate.

Below the nine, a Sandinista party with about 4,000 card-carrying members provides political "guidance" and interpretation of revolutionary policies to civilian administrative juntas on the provincial and local levels. Each town and provincial capital has a Sandinista headquarters, reporting directly to the nine, as well as a separate administrative junta--corresponding to the three-man federal junta--that conducts local government.

Outside of the party is a network of Sandinista-affiliated labor, agrarian, political and social organizations that compete, with what obviously is unfair advantage, against a dwindling number of corresponding non-Sandinista parties and groups. As the Sandinista line has hardened, alliances with the the non-Sandinista groups increasingly have been seen by Sandinista leaders as unnecessary and counterproductive.