Nine months after launching and losing a brief civil war that cost thousands of lives, Nicaragua's Sandinista guerrillas have begun what they say is their final offensive to topple President Anastasio Somoza.

This week widespread guerrilla forces have attacked National Guard outposts near Nicaragua's southern and northern borders, in the city of Leon and in suburban areas on the outskirts of Managua, the capital.

According to the Nicaraguan National Guard, whose southern counter attack includes the use of heavy artillery and jet attacks on Sandinista mountain positions, the offensive is rapidly turning into a repeat of the Guard's rout of the guerrillas last September.

Since the areas of heaviest fighting, in the scantly populated northeastern mining zones and in the south near Costa Rica, have been sealed off except for National Guard-run tours for journalists, interim victory claims from either side are impossible to verify.

Nevertheless, it is clear from Sandinista radio broadcasts and evidence of mobilization of urban supporters, that the guerrillas have entered a phase of all-out war in which they expect the population will rise up to join them.

Tomas Borges, a member of the Sandinistas' nine-member directorate, announced the "final offensive" on Costa Rican television last week. Early this week, he was joined by leader Humberto Ortega, who called for mobilization over Radio Sandino , the shortwave station operating in Costa Rica and named for the 1930s guerrilla leader who also gives the current rebel group its name.

At the same time, clandestinely distributed communiques from the United People's Movement - a leftist student-labor coalition whose cadres work in universities, factories and in the slums around Managua - called for activation of "civil defense" plans.

As the anti-Somoza was had sparked and sputtered over the past several months, the Movement has organized slum neighborhoods to stockpile food, water and medicines in anticipation of the offensive. This week's communiques directed neighborhood "combatants" to "take your positions," and instructed residents to leave their lights off and their doors unlocked at night to provide guerrillas with hideouts during intensifying street fighting.

Few venture out after dark these days in any of Nicaragua's cities for fear of both Guard patrols and rampaging crime.

On Wednesday, gunmen masked with red and black handkerchiefs commonly worn by the Sandinistas help up and robbed five foreign journalists who had ventured out to one of the few Managua restaurants open at night.

The outcome of the "final offensive may depend in part on the scale of the "mass insurrection" the Sandinistas have called for. While the number of guerrillas appears to have increased greatly - judging by their ability to send several hundred troops to different fronts simultaneously - they still seem vastly outgunned.

The National Guard has moved large troop contingents to El Ostional, a small town four miles from the Costa Rican border following a 300 strong Sandinista attack that began Tuesday. Infantry fighting the Sandinistas in the mountainous terrain are supported by 70 mm rocket launchers located nearly a mile from the main fighting. An officer there said 35 guerrillas were killed and five soldiers wounded in fighting since Monday.

The Guard is also firing rockets from 1950s vintinge T-33 jet trainers. According to the International Institute for Strategic Studies, the National Guard had four of the planes, which up to now had not been seen in use against the guerrillas. Previous air attacks had been made from small Cessna propeller planes and C47 transports.

Guard officers on the scene told reporters who were brought to the border area Wednesday that the guerrillas were returning fire with mortars from across the nearby Costa Rican border, although the journalists reported that no enemy fire reached the Guard artillery positions.

The National Guard said about 200 guerrillas had been surrounded in the hills and that their only exit was south toward Costa Rica. Heavy fighting was also believed to be under way in the southern provincial capital of Rivas.

A National Guard roadblock has been set up approximately 20 miles north of Rivas on the only approach road and reporters traveling there this week said soldiers leveled their guns at anyone who approached, ordering them back.

With guerrilla broadcasts coming from Costa Rica calling for a general strike starting Monday and urging Guardsmen to desert, a Guard communique Thursday charged that "at last the complicity of the government of Costa Rica in the international communist mercenary brigade is being denounced."

Although the Costa Rican government has never admitted it, it is an open secret that the Sandinistas operate a number of camps in that country near the Nicaraguan border. The Costa Rican government on a number of occasions has half-heartedly tried to root them out, following strong U.S. pressure and Nicaraguan denunciations.

But widespread civilian dislike of Somoza in Costa Rica, and a romantic sort of popular approval for the Sandinista cause, as well as the inefficiency of the Costa Rican Civil Guard and its own sympathy for the guerrillas, have made such action difficult.

Sympathetic foreigners are also fighting alongside the Sandinistas, including a volunteer brigade of about 80 Panamanians, led by Hugo Spadafora, a physician who resigned his position as Panamanian vice minister of health to join the guerrillas last fall.

Panama has said it does not officially provide manpower or material aid to the Sandinistas, although in April several Panamanians were charged in Miami with buying guns and trying to transport them illegally out of the country. Nicaragua says it has captured the same type of guns.

For the most part, however, the Sandinistas are believed to buy their weapons, which consist both of small caliber and automatic weapons, some mortars, bazookas and 50-caliber machine guns, on the international black market, through intermediaries. CAPTION: Map, no caption, By Dave Cook - The Washington Post