As Arnulfo Arias celebrated his 82nd birthday in Panama this week, aides said he was preparing, once again, to become that country's president.

He held the position three times in the past 44 years; he lost it in coups all three times. The last time he was elected, in 1968, he lasted only 11 days before the National Guard threw him out.

In other circumstances or another country, Arias' statement at a convention Sunday--"Here we are again, offering our services to the country"--might seem quixotic.

But Panamanian politics are conspicuous for their Machiavellian complexity and Arias, the last of Latin America's famous caudillos, who was often in trouble because of his avowed suspicions of the Americans and his open distaste for the military, may now have both on his side.

In the last year Arias has been on cordial terms with the top military officers, including the powerful new commander in chief of the Panamanian National Guard, Gen. Manuel Antonio Noriega.

Louis Martinez, a close associate of Arias, said after the convention that there is now "a mutual respect between Arias, who is the opposition, and the National Guard, who is Noriega. I think the animosities have been buried."

Arias has also made some of the most pro-Reagan statements to be heard anywhere in the region.

Meanwhile, the man who until this summer looked like a shoo-in for the presidency next year--outgoing National Guard Chief Gen. Ruben Dario Paredes--is being put in an ever weaker position as the potential "official" candidate.

The White House has focused little public attention on Panama in the last few months because of the situation in El Salvador and Nicaragua. But Panamanians note that while Washington may have "drawn the line" against communist influence on the isthmus in El Salvador and Nicaragua, the bottom line strategically remains in Panama.

As one prominent Panama City lawyer put it recently, "Central America is a kind of hospital with various patients. The most serious attract our attention. But we are all patients and if you don't take care of some of them, they become critical too."

He smiled. "Panama is the only patient that has a canal."

For more than a decade Panama's politics were dominated by the late general Omar Torrijos, who commanded its National Guard, and for many decades by a single issue, the canal. As Panama is faced with growing economic problems and increasing disillusionment with the "revolutionary process" fostered by Torrijos in the 1970s, Arias has reemerged as virtually the only local "doctor" that Washington, the growing opposition parties and possibly even the new leadership of the National Guard can agree upon.

Part of his appeal is almost impossible to explain in rational terms.

"He has, well, charisma," said a prominent leader of the opposition Christian Democratic Party. He added that whatever coalition the broad-based opposition may put together before the May 1984 presidential elections--the first since Arias was elected and ousted in 1968--"Arnulfo Arias would have to be in the presidential slot."

A well-connected lawyer in Panama City said, "If all the opposition here went with the government and Arias ran alone against all of them, Arias would win."

Attempting to explain the phenomenon and the mystique of Latin America's caudillos, the lawyer pointed to the other highly personalistic and nationalistic Latin American leaders of the 1930s and 1940s, such as Juan Peron in Argentina.

Age might be a problem for politicians who are not caudillos, said the lawyer. "But the caudillos, for their people, do not have any age. It is part of the mythology."

Using this mythology, leaders in the several opposition parties have been saying privately for months that the key to installing a civilian government next year is to put Arias at the head of a coalition ticket in the elections.

In such a scenario, the two vice presidential slots become especially important. There is considerable speculation in Panamanian political circles that these might be filled by Mario Galindo of the middle-class and professionally oriented Nationalist Republican Liberal Movement and the Christian Democrats' Ricardo Arias Calderon.

The resurgence of Arias also springs from the mistakes of National Guard leader Paredes, the internal dynamics of power in the National Guard and the country's mostly friendly but always slightly awkward relations with the United States.

If Paredes became president, he would technically remain in charge of the National Guard, as is current civilian President Ricardo de la Espriella--who is constitutionally prohibited from seeking another term. But as a military man, Paredes' orders to the institution would probably carry more immediate weight.

Yet as one top civilian politician calculated recently, "Noriega is not going to want some guy as president who is going to continue running the Guard."

Instead, said the politician, Noriega would prefer a civilian regime running the country while he works on the "professionalization" of his forces. "Noriega is a complete enigma," said the politician. "Nobody knows what he thinks. He is the man tied to Cuba. He is the man tied to the Pentagon."

But the politician added that Noriega, for a dozen years the chief of intelligence under Torrijos, will want to establish the reputation of his force as one of the most professional and nonpolitical in the area as Panama looks toward taking over the defense of the canal in the year 2,000.

Having Paredes as president could only make that job more difficult, the politician speculated.

Paredes, moreover, seriously alienated Washington earlier this year when he threatened to declare U.S. Ambassador Everett Briggs persona non grata on the pretext that the envoy had made an unauthorized visit to a Panamanian garrsion.

By several accounts, Paredes found himself snubbed by everyone but Pentagon officials when he visited Washington in June.