Gen. Omar Torrijos was buried today in a small crypt only a few hundred yards from the edge of the old Panama Canal Zone, at the foot of Ancon Hill.

The president Torrijos appointed, the colonel who succeeded Torrijos as commander-in-chief of the National Guard and the head of the political party Torrijos created eulogized him.

Tens of thousands of people pushed through the gates of Amador cemetery and crowded around as their uncertain new leaders told them the man who had led them for 13 years was, in President Aristides Royo's words, "one of those men who do not die."

Panamanian Archbishop Marcos McGrath, assessing the impact of Torrijos' death during the funeral mass in Panama City's cathedral this morning, said it "leaves a gap in the social, political history of our homeland and to some degree in Central America and the Third World."

Although Torrijos had largely retired from the day-to-day administration of the country since 1978 when he started Panama on a path toward elections in 1984, he was still the anchor that stabilized the country, a kind of one-man constitution.

While he is best remembered internationally for negotiating with the United States the 1979 Panama Canal treaties, which will give Panama complete control of that strategic waterway in the year 2000, Torrijos had slowly transformed the entire political character of his country.

He eschewed ideology in favor of pragmatic programs of social reform. He moved the National Guard away from the classically brutal banana-republic practices of the past and tried to make it a base for liberal reform.

"Neither with the left hand nor with the right," Torrijos once said, "we are working with both hands."

Although he spent mcuh of his time traveling among his country's peasants, he was also the friend of international bankers. One of them who came down from Miami for the funeral, Bernardo Benes, looked out pensively over the crowd in the little cathedral square this morning.

"Torrijos gave these people a national identity," said Benes, "and that you don't get from many leaders."

The dignitaries and delegations attending the funeral from throughout the world showed by their presence the kind of statesman Torrijos had been.

In the tightly packed pew of the cathedral were the chairman of the U.S. Joint Chiefs of Staff Gen. David C. Jones and leftist Nicaraguan Minister of the Interior Tomas Borge, Costa Rican President Rodrigo Carazo and Cuban Vice President Carlos Rafael Rodriguez.

In the first hours after the announcement Saturday of Torrijos' death in a plane crash the day before, many Panamanians seemed at a loss to express how they felt. A few actually threw parties and celebrated.

But the funeral today left little doubt about the sense of emptiness Torrijos' passing has created among his countrymen. Tens, perhaps hundreds of thousands of people poured through the streets to mourn him.

A riderless horse led the two-hour procession from the cathedral to the cemetery. A fire truck bore the flag-draped coffin on a high platform. Flower petals were showered on it from turn-of-the-century balconies in the ramshackle downtown.

Behind the truck walked Raquel Torrijos, his widow, leaning on the arm of Royo. National Guard commanders in starched uniforms marched somberly before a crowd of chanting students and masses of other mourners making their way through the faded pastels of Panama City ingrim silence.

The eulogy of Col. Florencio Florez, Torrijos' successor as head of the National Guard, was short and gave little indication of how this man who has been so long in Torrijos' shadow will operate now that he will be the nation's final arbiter of power.

More than Royo or the head of Torrijos' Revolutionary Democratic Party, Gerardo Gonzales, Florez seemed to feel for and speak to the dead general.

With reverence Florez drank from the famous canteen that Torrijos wore on his endless travels through the Panamanian countryside.

"Our rifles will always honor his memory," said Florez.

To the singing of the Panamanian national anthem and a salute fired from artillery pieces on the side of Ancon Hill, the coffin was lowered into the grave. Florez handed the flag that had draped it to Torrijos' widow. He put his arm around her.Both of them appeared to be on the verge of tears. CAPTION:

Picture, National Guard officers carry the body of Gen. Omar Torrijos up the steps of Panama City's cathedral. Thousands attended yesterday' funeral. AP