Rather to the surprise of everyone in the Middle East, King Hussein Ibn Talal al-Hashim of Jordan is celebrating his silver jubilee this summer, marking 25 years of a "Perils-of Pauline" reign that few believed would last this long.

This inexperienced teenager who ascended the throne of a weak and impoverished country when his schizophrenic father was forced to abdicate in 1952 has become the Arab world's most durable ruler.

He has survived war, intrigue, personal tragedy and the enmity of other Arab leaders. Would-be assassins have fired at his plane, machine-gunned his car and poisoned his nosedrops. The uncertainty of his rule was the theme of his autobiography, published in 1962, and entitled "Uneasy Lies the Head".

In this year of his Jubilee celebrations, he was weathered the death of his third wife, in a helicopter crash, and the revelation that for many years he received payments from the Central Intelligence Agency.

"It's just amazing," said an Arab diplomat, summarizing a widely held view. "Twenty years ago you were sure that the king and the shah of Iran were on the way out. And there they are, stronger than ever."

Hussein, who because of his short stature and his history of narrow escapes is often referred to by foreigners as the "plucky little king," was a pariah among his fellow Arabs after his army fought a war with the Palestinian guerrillas in 1970.

But he has come back to respectability. The death of President Gamal Abdel Nasser of Egypt removed his most implacable opponent. The civil war in Lebanon made possible a shrewd alliance with once-hostile Syria. And the possibility of a Middle East peace conference has made him, for the moment at least, indispensible to the Egyptians.

The king was broadening his international ties by establishing relations with the Soviet Union and China, a departure from the absolustis anti-communism of his earlier years. The economy of his Indiana-sized country, though still dependent on foreign aid, is flourishing and the king appears secure at home.

The Jubliee ceremonies have none of the regal splendor that marked the festivities earlier this year for the 25th year of Queen Elizabeth II of Britain or the shah's 1971 celebration of the 2500th anniversary of the Persian Empire, Jordanian officials say that would be inappropriate for a small struggling country that has been independent for only three decades.

Instead, Jordan is organizing folk-lore and pagaentry spectacles and sports events in provincial towns. On Aug.11, designated Jubliee Day, the anniversary of the day on which the Jordanian Parliament ratified Hussein's accession, the king is to deliver a speech at a youth and sports complex.

On his 42d birthday, Nov. 14, the king will preside over an international water skiing competition at Aqaba. Several foreign countries are marking the occasion with cultural exchanges. The British are sending a production of Hamlet, the French are sending tapestries.

The king will also dedicate a new unknown soldier memorial, a monument that neatly symbolizes a Jordan's brief history. Designed and built by the British, it contains the remains of a soldier who died in the 1967 war with Israel that cost Jordan much of its fertile land, and houses a little museum of the farmed Arab Legion, the desert army built by Hussein's grandfather, King Abdullah, that is Hussein's power base.

Abdullah was the son of Sherif Hussein of Mecca, a descendant of the Phophet Mohammed. It is this link to the prophet and to the desert princes who led the Arab nationalist movement in this century that give King Hussein a claim to legitimacy, even though he rules a kingdom that was the artificial creation of the colonial powers.

The monarchy is Jordan is not nearly as well established as that of neighboring Saudi Arabia, Jordanian intellectuals say, but Hussein has parlayed his antecedents into an aura that cannot be matched by the Presidents and military dictators of the other Arab states.

Much of Hussein's autobiography is treacly stuff, in which he wrote of Jordan as a "happy little country" where simple bedouin folk tend their flocks and say their prayers.

It also contains revealing insights into his talent for survival. While undergoing a cram course at Sandburst, the British Military academy, after he was chosen to be king, Hussein says, he dedicated himself to "discipline and work."

"I had seen enough of Europe even at 17 to know that its playgrounds were filled with ex-kings, some of whom lost their thrones because they did not understand the duties of a monarch," he wrote. "I was not going to become a permanent member of ther swimming parties in the south of France."

Hussein became king the same year the moanrch was overthrown in Egypt. Six years later his cousin and friend, King Faisal of Iraq, was ousted in a bloody coup and Hussein "wondered if I would live the year out."

The year before, loyal army units had helped, Hussein thwart a coup attempt by his own prime minister and army commander. He was forced to call for outside help at the time of Faisal's downfall, asking for British troops to shore up his position against "the latest pharoah across the Nile," Nasser.

Crisis followed crisis. The Israelis routed the Jordanian troops on the West Bank of the Jordan in the 1967 war and captured the territory, which thye still hold. In 1970 and 1971, Hussein used his army to drive Palestinian guerrillas out of the country, where they were virtually running a state within a state.

In that war, Syrian tanks entered Jordan from the north to support the Palestinians, but failed to advance because the Syrian air force commander withheld crucial air support. That commander was Hafez Assad, now president of Syria and Hussein's ally and partner in a gradual intergration of the two countries.

Hussein was humitiated at an Arab summit conference in Rabat, Morocco. It striped him of his claim to the West Bank, recognizing the Palestine Liberation Organization as the "sole legitimate representative of the Palestine people," to have authority over the West Bank if it was liberated from Israeli occupation.

Hussein accepted that decision , officially. But it is clear here he still hopes to re-establish some form of Jordanian sovereight over the West Bank.

Israel's refusal to negotiate with the PLO has made it necessary for the other Arab states to propose that any Palestinian entity on the West Bank be officially linked with Jordan, most of whose people are of Palestinian origin.

Hussein, who has been saying lately that east and west banks are really one country, is said to believe that people of the West Bank would not necessarily choose the PLO to rule them if they were to be granted some form of autonomy. JOrdanian and Palestinian sources say this is the reason that the much publicized reconciliation lunch between Hussein and PLO leader Yasser Arafat in March has not led to productive negotiations.

Jordanians say that is the Arabs continue to insist that the Israelis turn the West Bank over the PLO, the Israelis will never pull out under any circumstances: but that if the Arabs assent to renewed Jordanian sovereignty, however disguised, this might be made palatable to the Israelis.

So King Hussein, lover of jet planes, fast cars and pretty women, is very much a central figure in the Arab scene as his Jubliee approaches. There are, a Western diplomat observed the other day, "a lot of people paying off bets that he would never make it."