Thousands of desperate Nicaraguans began looting long-closed stores here today, lodging bullets while trying to balance huge loads of stolen goods.

As word of new break-ins spread, slum residents ran toward stores and shopping centers in middle-class areas, scrambling barefoot over piles of broken window glass to fill boxes and bags that many carried away on their heads.

Commerce has been shut down in the capital, as a three-week-old strike has given way to widespread street battles that began over the weekend. Even those with money no longer can buy food. The poor who could not store provisions for the long-anticipated war picked their way over prone soldiers, in firing positions, to reach the bounty.

In an unannounced televised speech tonight, President Anastasio Somoza said the government would begin a food distribution program Thursday in those parts of the city not currently under siege. He referred to the "shame" Nicaraguans were suffering because of "having to take things not theirs in order to feed their children."

Looking worried and angry, Somoza said he was "very sorry for what is happening" in the capital.

In his first statement on the Managua conflict since it began, Somoza acknowledged that the city is "closed down" and asked Nicaraguans to "confront the situation calmly."

He repeated his charges that foreign governments are supplying and supporting the Sandinista guerrillas and that their citizens, or "mercenaries," are fighting here.

In what appeared to be both a plea and a veiled threat, Somoza ended his short speech by saying "Please, don't force me to apply the law, because above all things, I love my fellow citizens."

With the battle for Managua still intense, the U.S. Air Force flew out two more planeloads of Americans - about 150 persons, mostly women and children - to the Panama Canal Zone for transfer to commercial flights home. A first flight carrying 61 dependants left Tuseday.

Heavy fighting again was reported in the northern part of the country, where the guerrillas control serveral cities and a number of small villages while the National Guard concentrates its main effort in Managua.

As battles in widespread areas of the city continued, the National Guard regained some territory and lost some won day before. Tuseday, about half of the five-mile highway to the international airport was clear of rebel barricades.

Today, while the airport itself apparently remains untouched - and a flight from Miami landed - the tenacious guerrillas reconstructed barriers nearly the length of the highway. As about 150 guardsmen moved out of the headquarters to begin moving up the highway, they were forced to battle their way through sniper fire.

There is no way to say who is winning the battle of Managua, which could go on for some time.

President Somoza told an American television interviewer earlier in the day that the fighting andlooting were "only in certain parts of the city but the country in general terms is in peace."

The guerrillas aare often aided by residents who have not fled the neighborhoods of heaviest fighting. Neighbors often move into the streets to help build barricades and, before the Guard moves in for the inevitable "cleanup," the atmosphere is often jubilant. Many people in the slums talk about such temporarily rebel-controlled areas as "liberated zones" or "peoples areas."

But the Sandinistas can be ruthless with some local residents. This morning, a sobbing man ran into the Intercontinental Hotel with five small, dirty children. He said he was a teacher from a nearby barrio who the guerrillas had branded an oreja , the Spanish word for ear that in local vernacular means government spy.

The man said the rebels had posted his picture on street corners, burned down his office and issued orders for his death.

The hotel is where most foreign journalists here are staying, along with growing numbers of government officials and wealthy refugees. A pyramid-shaped building on a hill, its ninth floor roof is the highest point in central Managua - except for Somoza's hilltop home and helicopter pad located behind it.

The roof has become a macabre theater that affords the best and safest view of the destruction of the city.

It is in the shanty towns, seen at a distance, that most of the fighting and the rocket attacks by National Guard planes occur, although ground battles often ebb and flow close in below the hotel. With the city's surrounding hills providing a backdrop of bizarre beauty, the planes bank and dive, open fire and climb away as plumes of black smoke rise from the ground.

The central market was looted yesterday and little remains in its scavenged stalls. Today, residents broke into shops along the main streets, often carrying off items for which they had no conceivable use.

At a neighborhood movie theater, men, women and children ripped rows of seats out of the floor and carted them away. From a photo studio came packages of photographic paper and film. One young girl in a torn dress and bare feet carried an enormous black and white enlargement of a well-dressed woman and her children smiling into the camera.

"This is good wood," she said, knocking on the picture backing. "I can use this for a table."

Close by, shots rang out and National Guard troops who had been casually watching the looting jumped behind walls and lay on the ground returning the fire.

"Everyone is afraid to stay in their houses," said the Rev. Raul Bendona, a Baptist minister at a refugee center.

"There really has not been much fighting here," Bendona said. He explained that seven or eight civilians had been shot by soldiers on Sunday and Monday when they started to run as troopers began a sweep of the ares.

"The rebels here waited for arms, but they never came. Still, the people are afraid to go home. They are afraid something will happen."