The sudden death Friday of Gen. Omar Torrijos, whom many saw as a necessary anchor for Panama's historically chaotic political institutions, has left Panamanians shocked and concerned about their country's future.

During the past 13 years, Torrijos had made himself an institution, first as head of state and then as the omni present power not far behind the scenes, accepted even by his opponents as a necessary source of political stability.

The sudden loss of Torrijos, 52, has provoked concern that this site of the strategically vital canal across the Central American isthmus could once again become the center of endless and destructive political intrigue.

"Torrijos had the lid on this boiling pot," said one member of the opposition who asked not to be quoted by name. "Now the lid is off."

Although few people believe the crash of Torrijos' plane in a mountainous jungle of the western isthmus was anything but an accident, they see the potential for a major power struggle to emerge among Torrijos' more ambitious subordinates. Serious conflicts exist not only within the government, where frictions between President Aristides Royo and Vice President Ricardo de la Espriella have been reported but within Torrijos' center of power, the 9,000-member National Guard.

[The Associated Press quoted aviation experts as saying that the twin-engine Otter Torrijos died in was flying over cloud-shrouded jungles when it crashed into a rocky hill on one of the most dangerous air routes in Panama. It was the second crash by a National Guard plane on that hill this year, AP said.]

In a televised address to the nation last night, Royo took pains to demonstrate unity and the continuity of his government, which essentially was appointed by Torrijos in 1978. All the senior civilians and the entire high command of the guard were present.

For the moment, the National Guard chief of staff, Col. Florencio Florez, has been named to succeed Torrijos as chief commander of the guard, the post Torrijos maintained even after he stepped down as chief of state.

The substantive power within the guard, which is the country'sf only military institution, is believed to be in the hands of three other men: the chief of intelligence, Lt. Col. Manuel Noriega: the deputy chief of staff, Col. Ruben Dario Paredes, and the secretary general of the guard who is also a Torrijos' cousin, Col. Roberto Diaz Herrera.

The ruling Democratic Revolutionary Party, which was created and bound together more by Torrijos' personal charisma than any ideology, may now have a hard time remaining intact.

Recently there had been talk that Torrijos might run for president in an election scheduled for 1984.

As so often happens with the unexpected, few people from diplomats to housewives seem very certain of anything at the moment.

Many seem unsure even of how popular Torrijos actually was.

Osvaldo, a private security guard at a downtown drugstore, after asking that his full name not be printed because "it might prejudice me" said: "There are probably many people in Panama who did not think that Torrijos did good things. Some are certainly happy at his death. But in reality, I think he did a lot for the country. He had a lot of the public with him."

As with so many strongment, the level of Torrijos' personal popularity has long gone unmeasured. What was clear about him, sometimes all that was clear about him, was his skill at keeping and wielding power.