Long lines of soldiers appeared suddenly on the sharp mountain ridges leading to this valley deep in Nueva Segovia province. They were rising from the cover of all-night ambush positions guarding their camp, more than 400 of them, part of elite rebel units fighting the leftist Sandinista government of Nicaragua.

Small landowners and local country people for the most part, the troops are commanded by tough professional soldiers from the old National Guard of the dictatorship of Anastasio Somoza, who was ousted by the Sandinistas in 1979.

For the first time last week, the counterrevolutionaries brought two U.S. reporters here in the midst of heavy fighting to lift some of the cloak from their long-secret war.

For six days and more than 90 miles through the broken mountains, pasturelands and tropical forests of Nueva Segovia, we moved with units of the Nicaraguan Democratic Force, the largest and richest of Nicaragua's counterrevolutionary groups. The conditions set for the visit were that we would not reveal the exact way that we entered Nicaragua or the location of any major base camps.

These guerrilla units, under the field command in this region of a former National Guard first sergeant they call "Suicide," appeared to be as well trained and well armed as virtually any regular infantry in Central America. The antennas of U.S. field radios waved above many shoulders. Others bore U.S. grenade launchers, U.S. .30-caliber machine guns. Some wore U.S. boots, packs and belts. They hoisted sophisticated U.S. light antitank weapons.

One squad commander said he was graduated less than a month ago from a 65-day course in leadership and tactics taught by six Argentine colonels in a special school outside the Honduran capital. Many other soldiers said they were trained initially in Honduran border camps, where units of about 200 men each were prepared for combat.

None said where his Belgian-made FAL automatic rifles came from, but such guns were standard issue to the Honduran Army before the United States began reequipping it with M16 rifles in the past two years.

Charges of U.S., Argentine and Honduran backing for the rebellion against Nicaragua's Sandinista government have long been the subject of news leaks and angry diplomatic exchanges. U.S. officials have refused comment on the reports. For soldiers in the field, however, such backing is a given--and considered by them to be their most important advantage in the struggle with the Sandinistas.

Already seasoned by months of combat, they had fought eight hours the day we joined the main force. They would fight until after dark the next day as well, with the full firepower of three companies brought to bear against Sandinista Army units seeking out positions nearby.

Their morale was high. With the United States behind them--"the most powerful country in the world," as some liked to describe it--many of the rebels said they believe they cannot lose.

Having turned these mountains into what they call "enemy territory for the Sandinistas," counterrevolutionary commanders said they hope within a matter of weeks to take and hold a major town in the region, probably the dusty little garrison of Jalapa, a few miles south of the Honduran border.

This could open the way for recognition and resupply by land and air. The guerrillas' fierce optimism about this is shared by some of the Hondurans who have helped the anti-Sandinistas, despite the possibility that such a move might provoke open hostilities between Nicaragua and the U.S.-backed Honduran Army.

"We are ready for that," one well-informed Honduran officer said in that country's capital last week after a meeting with other commanders. "I don't think there's any secret in this anymore. It's a question of you or me."

There is concern, however, that Washington might try to pull back from its vital support of these troops if the situation gets too explosive.

"The United States is helping us in a way we don't want. They are saying no, no, no to everything. Our men want to do spectacular things," complained one counterrevolutionary political leader outside Nicaragua who was instrumental in setting up our visit. "You have the momentum, and they stop you. It's like an invisible hand holding strings."

As did his men on the ground here, he dismissed the Reagan administration's assertion to Congress that Washington's support for the anti-Sandinistas is intended essentially to cut the Nicaraguan government's arms supplies to insurgents in El Salvador.

"The people who are fighting, they are not fighting to stop the weapons," the counterrevolutionary leader said. "We are fighting to liberate Nicaragua."

As Suicide put it here in the middle of the war zone, "We're not going to stop the transport of arms and supplies to the Salvadoran guerrillas or the Guatemalan guerrillas until we cut the head off the Sandinistas."

The counterrevolutionaries express little ideological or political coherence, beyond an intense desire to rid the country of what they call communist influence and eliminate its present leadership. The leaders appear to hope that just as in the 1979 insurrection against the Somoza dictatorship, Nicaraguans will unify against what they say is a bad government even if they are not sure what will replace it.

They count on touching an insurrectionary nerve that they believe runs deep through Nicaraguan history and society, and they say that while U.S. aid undoubtedly helps them, they will continue fighting even if it is cut off.

"This is not the second civil war that Nicaragua has had. We've had dozens of them," said Nicaraguan Democratic Force political leader Adolfo Calero. "Whether there is U.S. support or there is not U.S. support will not make the difference of whether there is fighting or no fighting in Nicaragua . . . but whether it will be a long bloody affair that will destroy the country or whether it will be quick."

As the threat of counterrevolution has mounted, the Nicaraguan government repeatedly has focused on the possibility of an invasion from Honduras, describing it as something that might be fought in an almost classic war of fronts. But what has happened is a massive infiltration.

"I'm breaking new ground every day," said Suicide, whose real name is Pedro Pablo Ortiz Centeno. "They won't get me out of here now."

A short, hard man, 32 years old with a mustache and goatee that give his features a vaguely oriental aspect, this guerrilla warlord of Nueva Segovia claims to have almost 2,000 men under his command. In neighboring Madriz and Jinotega provinces and down into Matagalpa and Boaco the counterrevolutionaries claim thousands--and there are almost certainly hundreds--more armed men. In the forests and jungles of the isolated Atlantic Coast, meanwhile, an allied force of Miskito and other Indians is said to be at least as large and well armed.

As we traveled more than 30 miles inside Nicaraguan territory in several incursions, we were able to talk to scores of counterrevolutionaries, their commanders and many peasants under relatively relaxed circumstances in protected campsites. We also saw the troops in heavy combat.

While the Sandinistas have been trying with extensive help from East Bloc countries to transform their guerrilla force of four years ago into one of the biggest regular armies in Central America, members of the National Guard that they defeated have made a much more successful and rapid transition to the role of guerrillas.

On the road in the Arenales area, for instance, near the Sandinista redoubts at El Doradito and Murra, Suicide stationed several ambushes to guard our approach. When more than a company of government troops caught sight of us moving through open ground and tried to intercept us at the road crossing, Suicide's men hit them head on.

Grenade, bazooka and mortar explosions echoed for miles through the hills. But Suicide's main units held their ground, reporting not a single serious casualty as they remained in position until nightfall picking off Sandinista soldiers trying to recover the dead, the wounded and their guns.

In official propaganda, the Sandinistas call the Democratic Force troops "genocidal guardsmen," or "beasts," or "Somocistas," resurrecting the nightmarish repression of the final days of the Somoza dictatorship when the Nicaraguan National Guard bombed civilian populations and summarily executed men and boys in the streets of Managua.

"They say we are National Guard, and that's true," Suicide remarked in reference to 16 of his key aides. "But today things have changed." The Sandinistas, he said, "don't know what to make of us."

The counterrevolutionaries led by Suicide appeared to count on considerable and invaluable support among the few peasants left in the increasingly deserted war zone. The locals, some of whom are related to rebel soldiers, sold provisions to the troops with which we traveled, sheltered them and often provided them with intelligence about Sandinista movements.

When the Sandinistas came to power in 1979 they did so with remarkable speed at the head of a broad-based popular uprising against a hated dictator who was undermined on all sides and had even lost the support of Washington.

Faced with forces like those in Nueva Segovia, it appears likely that the Sandinistas' fight to consolidate their power may be longer and perhaps just as bloody as the revolution itself.