The Nicaraguan government charged yesterday that Venezuelan warplanes supported an early-morning invasion by guerrillas entering from Costa Rica to attack a border town.

The invasion force of about 180 Nicaraguan guerrillas reportedly seized the coastal town of Penas Blancas, opening a southern front in their battle against the government of President Anastasio Somoza.

Nicaragua said the attack was undertaken "with the military support of the government of Venezuela." It went on to accuse Costa Rica of complicity in the invasion.

Four Venezuelan warplanes were sent to Costa Rica last week as a warning to Somoza after his forces crossed the southern border in pursuit of rebel forces. Costa Rica has no armed forces of its own.

Sources close to the Sandinista Liberation Front guerrillas denied that the Venezuelan aircraft were used in the attack yesterday. Costa Rica denied that any plane based on its territory was involved.

Meanwhile, in Leon - Where the government's National Guard routed rebels Friday after they had held the city of 80,000 for a week - the Nicaraguan Red Cross said that it was sheltering more than 3,000 residents in refugee camps. Their homes had been destroyed or they had no food or money, a spokesman said.

Heavy fighting continued in the northern cities of Chinandega and Esteli, both said to be still largely in the hands of guerrilla-led local rebels.

Nicaragua said it has lodged a formal diplomatic protest over yesterday's border assault with the government of Costa Rica, and would denounce "this new aggression" before the Organization of American States.

The invasion was the fourth guerrilla attack in a week from Costa Rica, where the Sandinistas maintain a command center. Three previous attacks early in the week were repelled by the National Guard.

Sources said the guerrillas in the south were armed with mortars, bazookas, and possibly some antiaircraft guns. They were believed to be headed from Penas Blancas north toward the city of Rivas, some 80 miles south of Managua.

Informed sources said the guerrillas intend to create a "liberated zone" in southern Nicaragua from which to launch operations to the north. While the sources said the zone would be protested by the governments of Venezuela, Costa Rica, Panama and Mexico, those governments have not confirmed such support.

The guerrillas, in three columns of about 60 each, reportedly are led by two members of the five-man Sandinista national directorate, and by Eden Pastora, "Commander Zero" in a guerrilla raid on the National Palace in Managua last month.

Pastora, 42, was born near Matagalpa, 60 miles north of Managua. He is a long-time combatant on what the Sandinistas call the southern or "Benjamin Zeladon Front," named after an early 20th century Nicaraguan patriot.

The other two commanders, Mexican-born Victor Manuel Tirada, 37, and Daniel Ortega Saavedra, in his early 30s, were among the founders of the Sandinista organization in 1962. Both have been active for many years on the northern, or "Carlos Fonseca Amador Front," named after another Sandinista founder who was killed in the northern mountains two years ago.

Non-guerrilla opposition leaders have requested a cease-fire in the civil war, now entering its fourth week, and mediation by a Latin American country. They said yesterday, however, that Somoza has refused all mediation efforts.

While the Somoza government has continued publicly to maintain its openness to dialogue with the guerrilla-supported political opposition here, the opposition leaders said Somoza told countries offering to mediate that "foreign mediation is to be used only in conflicts between two countries" and not in internal conflicts.

Although the United States has refused to take a public stand against Somoza, calling for his acceptance of a cease-fire and mediation, the opposition leaders said the United States is now playing a leading role as liaison between those Latin American nations that have offered to mediate - including Mexico, Venzuela, Costa Rica and Panama - and Somoza.

U. S. Embassy officials have refused public comment on their role, but U.S. Ambassador Mauricio Solaun is known to have met with Somoza a number of times during the past week. Opposition leaders said they are in close contact with embassy officials.

Yesterday, for the first time in three days, the National Guard allowed journalists to enter Leon, which the rebels had held for most of last week.

While the city appeared calm and under total National Guard control, there was extensive damage in the downtown from aircraft rocket and machine-gun fire.

No one has yet ventured firm casualty figures. The Red Cross confirned reports that on Saturday families collected the bodies of those killed in the streets and quickly buried them, many in their own backyards, to aviod their identification by the National Guard.

The Red Cross said it found 42 bodies in the streets Saturday morning. All were covered with gasoline and burned on the spot to avoid the spread of disease.

Raymond Chevalley, the International Red Cross representative for Central America, who visited Leon Saturday, said he believed that "hundreds," of residents had been wounded in Friday's air attack, but that many of them would not show up for medical treatment because of fear of being arrested.

Looting was extensive in the bombed downtown area, apparently having occurred during the week while rebels controlled the city.

Standing in a doorway across from the food and department store he said he has operated for 45 years in downtown Leon, Ramon Klopez Jiron, 74, said yesterday that his inventory had been entirely wiped out. While he said that he did not necessarily support the guerrillas, Lopez said he believed the violence in Nicaragua would not stop until Somoza resigns and leaves the country. "If Somoza leaves," he said, "it will all be over."

Father down the street, which was lined with bombed buildings and littered with glass and fallen power lines, looters crawled through the rubble that was once a liquor store and cheerfully gathered bottles of local rum and imported scotch.

At on point, a wall of the roofless store fell on a number of them, but they crawled up smiling through the fallen adobe and continued gathering booty.