Government troops withdrew from street fighting in this rebel-occupied city yesterday morning and began heavy rocket and strafing attacks.

The city of 80,000 - Nicaragua's second largest - is one of a number of cities where leftist guerrillas and their supporters have fought government troops in an effort to topple the government of President Anastasio Somoza.

Journalists and refugees from earlier battles were turned away at Leon's outskirts by a military roadblock. Although none of the bombardment inside the city could be seen, the impact of what appeared to be heavy artillery fire was heard.

Meanwhile, the U.S. ambassador asked Somoza for help in evacuating a reported 1,500 Americans in the north-western part of the country, where much of the fighting is taking place.

People inside Leon said in telephone interviews that the streets were completely empty and air attacks were continuous. Among those trapped in the city were an NBC producer and camera crew, a Newsweek photographer and a Peace Corps volunteer, who have been trapped at the home of a local physician since Wednesday.

The use of heavy firepower by the National Guard - Nicaragua's combined police and army - and the change from street fighting to shelling from the outside marked a new government strategy for routing the rbels.

The change is apparently a response to the rebel tactics of cutting down large trees bordering Leon's formerly shady streets, and building impassable barricades.

The battle for Leon and fighting in other provincial cities accompany calls for Somoza's resignation by a broad opposition front that includes politicians, businessmen, labor leaders and clergymen of a wide range of political positions.

Rebels also were reported entrenched in the cities of Esteli, Chinandega, Diriamba and Jinotepe.

Over the past several days, those who have been able to enter Leon have said it is completely controlled by the rebels, mostly high school and college age youths, led by what appear to be well-armed, highly professional guerrillas of the leftist Sandinistal Liberation Front.

Last Saturday night, the guerrillas attacked police and National Guard posts in five Nicaraguan cities, including Leon. By Sunday the National Guard appeared to be in control of this city, but heavy fighting began again on Monday and the rebels appeared to take control quickly.

Early yesterday morning a 200-troop contingent of National Guard soldiers left Managua to reinforce an estimated 600 or more already at Leon. The new troop convoy, which also included a flatbed truck carrying a tank, the first seen openly during the past several weeks, stopped on the road about 10 miles south of Leon.

The main National Guard forces are believed to have withdrawn from the city and to be garrisoned at military outposts on its perimeter.

At the military roadblock on Leon's outskirts, two residents who left the city yesterday morning said National Guard planes flew over at sunrise with a loudspeaker warning, "If you leave your houses, you are not safe. Stay in your houses."

There have been numerous reports of looting and burning of stores and offices in the city center. One of the reporters inside the city said by telephone that Sandinista leaders had come to tell him, as a respresentative of the international media, that the guerrillas had not set the fires or authorized the looting.

The guerrillas said they had not been able to control what they called popular actions and could not concern themselves at this point with policing the city.

Outside Leon, large groups of civilians sat along the side of the road near the military barricade.

Angela Valverde, a 47-year-old farm worker, said she had left the city Saturday afternoon, before the initial guerrilla attack, to visit some friends. Left inside alone were her three sons, age 5, 10 and 12.

Since then, she has sat by the highway waiting for permission to go home. Other refugees, she said, had told her that "there are children, like mine, dead in the streets."

Alberto Antonio, 56, said he and his family "spent five nights without eating or dinking" before he left Leon Thursday. "The others were going to come out this morning," Antonio, who picks cotton for a living, said.

Some of those waiting on the road said they no longer cared whether Somoza, whose resignation had been demanded by opposition groups, left the country or not. They said they only wanted the fighting to stop.

Others, primarily peasants, said that there was no going back to the way they have lived under the Somoza family for the past 45 years.

"The law is against us," said Antonio. He and the other refugees spoke of high prices, low wages and long-time antagonism between them and government officials.

In Managua, an emotional mass was held for two Red Cross volunteers killed when their plainly marked truck was attacked by machine gun fire on the road to Leon Thursday. A Red Cross official in Managua said the National Guard has fired on the truck, and later told him the attack was "a terrible mistake."

(In Geneva, the International Red Cross said the attack "was not an accident, but a deliberate act against the Nicaraguan Red Cross.")

Many Nicaraguans yesterday expressed horror at the all-out attack on Leon.

"They are savages," said one man who was turned away at the National Guard roadblock.

"They act like they're fighting a world war," said another woman. "He has no right," she said of Somoza. "He is crazy. He thinks he is God."

The woman, a Nicaraguan, was interviewed at the U.S. Embassy in Managua, where she and her American husband had come to plead for assistance for her brother trapped inside Leone.

"For four days, over th telephone we have been pleading with him to leave the city," she said. "He kept saying there was no danger. This morning, he called and said, 'I am going to die here today.'"

The embassy was virtually closed yesterday, a Central American holiday. U.S. military attaches and embassy officials were seen leaving the building in formal dress to attend a ceremony given by Somoza inside the Managua military garrison, where he lives and works.

A spokesman said U.S. Ambassador Mauricio Solaun had contacted Somoza to ask his cooperation in evacuating U.S. citizens trapped in Leon and other northern Nicaraguan cities.

Somoza asked for an official diplomatic note on the request, the spokesman said, and Solaun was scheduled to meet with him later in the day.

Many of the about 100 Peace Corps volunteers have been evacuated from troubled parts of the country to Managua or to Honduras.

While the capital remained calm, telex lines out of the country have been cut and both Associated Press and United Press International reported that their communications lines are no longer functioning.

In a bullentin issued yesterday, the government said all local media were under censorship. The bulletin also said dispatches from foreign reporters would be subject to censorship. This story was filed before the censorship took effect.

Despite the civil war conditions in the country, the government attempted to keep up an appearance of normality.

Approximately 60 foreign correspondents from the United States, Latin America and Europe are staying at the Managua Intercontinental Hotel, located next to the military garrison called "The Bunker" where Somoza has his office and where many high government officials have been camped out this week.

Soldiers have for several days occupied the top floor of the hotel, and Thursday night troops brought in at least a dozen crates of extra ammunition. Rooms of reporters have been searched several times by soldiers who say they are looking for Nicaraguans who have abandoned their homes and attempted to move "subversive elements."

The hotel manager has denied entry to the hotel to a number of wealthy in.

Managua streets were nearly empty yesterday and there were military checkpoints at many corners. Most of the soldiers were quite friendly to journalists, among the few who traveled outside yesterday.

Some of the soldiers, including a number of officers trained in the United States and in the U.S. counterinsurgence school in Panama, said they were professionals and would perform whatever duty the government called on them to perform.

On the road to Leon yesterday morning, soldiers in what appeared to be heavy construction trucks alternated between timid waves and stony stares at passing journalists.

One young enlisted man, however, answered a question to say that his own family was safe inside Managua.

"But I know many families, and have friends inside there," he said, pointing toward downtown Leon.