The Sandinista leaders of Nicaragua, predicting a rise in violence and anti-U.S. feeling in Costa Rica and Honduras, say they are depending on those factors to help them defeat U.S.-backed rebels and preserve the Sandinista revolution.

In interviews, Nicaragua's president, defense minister and interior minister projected determination to persevere amid rebel attacks, a disintegrating economy and rising complaints from the Nicaraguan public, in the expectation that opposition to the rebels from Honduras, Costa Rica and possibly the U.S. public ultimately will combine to force President Reagan to abandon his anti-Sandinista campaign.

"This war will be won by the side that has moral force, and that is our side," President Daniel Ortega said.

The officials' views largely echo those of other diplomats in Central America and in Washington that Reagan's policy now hinges on whether the rebel forces, boosted by nonlethal aid from the United States, can make military headway against the stronger Sandinista Army in the next few months, thus demonstrating popular support for their cause.

If they can, according to this theory, the Sandinistas will have to grant Reagan's demands in order to survive: sever Soviet and Cuban ties, demilitarize and open the political process to the rebels, known here as contras.

If the contras are contained, as the Sandinistas insist they will be, the frustrated rebels are sure to cause trouble and resentment in Costa Rica and Honduras, where the rebel bases are, and Reagan's policy will have to be reassessed, the diplomats predicted.

At the moment, all sides agree that the Nicaraguan Army has retaken the military initiative from the rebels, who launched some brief but daring raids this summer and have "a presence" but little strength in nine of the 16 provinces.

Many Nicaraguans complain about high prices, low wages, shortages and bureaucratic ineptitude. But the splintered, tightly controlled domestic opposition parties have failed to organize the discontent to their advantage.

In Honduras, officials publicly are supportive of U.S. efforts in the region but privately they are often critical of the contras as brutal and counterproductive. The Costa Rican government, however, recently has become critical of the Sandinistas.

Ortega said Honduras and Costa Rica "are no more than pawns in the U.S. plan," and that popular feeling is not reflected by either government. He and his brother, Defense Minister Humberto Ortega, both said this feeling will become more evident as the rebels prove unable to gain any military ground.

"They will become demoralized and become bandits in Costa Rica and Honduras . . . . Do not discount the possibility that Costa Rica will begin to resemble Lebanon," the defense minister said. At that point, he continued, neither government will be able to continue giving the rebels sanctuary.

"On the day they decide, they arrest everyone or take them to the border and that's it, the war is over," Ortega said. Contra violence already has begun to be felt in Honduras and will grow, the defense minister predicted. In Costa Rica, he said, the democratic left may soon take up arms to express itself.

"Costa Rica cannot think that the violence of U.S. aggression is not going to cross the border," he said. Asked if that were a threat, he said it was "not a threat, but a description of reality."

Costa Rica is the sole Central American republic with an extended democratic tradition. Honduras' current government also was popularly elected.

U.S. officials have charged Nicaragua with exporting revolution and with training terrorists and have warned the Sandinistas that any Nicaragua-backed attacks on U.S. citizens in the region will provoke retaliation. Interior Minister Tomas Borge called charges of terrorist training camps "an obscene lie."

All three officials dismissed any military threat from the new pro-rebel alliance of Miskito Indian groups formed in Honduras this month. "The alliance is convenient for the FDN," said Borge, referring to the largest rebel group, called the Nicaraguan Democratic Force in English. "But it generates contradictions, too. The FDN discriminates and the groups have no confidence in each other."

Humberto Ortega said any unity among the rebel groups in the recently formed United Nicaraguan Opposition has been imposed by the United States and is tenuous at best. The group has been designated by the State Department to handle the recently approved $27 million in nonlethal U.S. aid.

The Nicaraguan leaders also dismissed the possibility that the contras could continue their attacks without U.S. help. U.S. aid continues through Honduras despite last year's cutoff by Congress.

The Sandinista leaders agreed that contra pressure, the U.S. economic boycott, low prices for exports and their own wartime spending have brought the Nicaraguan economy to the brink of collapse. But they insisted that the hardships have unified Nicaraguans against the contras.