BEIRUT, Lebanoninfo-icon -- Lebanon's prime minister, Saad Hariri, was summoned at 8:30 a.m. to the Saudi royal offices -- unseemly early, by the kingdom's standards -- on the second day of a visit that was already far from what he had expected.

Mr. Hariri, long an ally of the Saudis, dressed that morning in jeans and a T-shirt, thinking he was going camping in the desert with the crown prince, Mohammed bin Salman.

But instead he was stripped of his cellphones, separated from all but one of his usual cluster of bodyguards, and shoved and insulted by Saudi security officers. Then came the ultimate indignity: He was handed a prewritten resignation speech and forced to read it on Saudi television.

This, it seemed, was the real reason he had been beckoned to the Saudi capital, Riyadh, a day earlier: to resign under pressure and publicly blame Iraninfo-icon, as if he were an employee and not a sovereign leader. Before going on TVinfo-icon, he was not even allowed to go to the house he owns there; he had to ask guards to bring him a suit.

As bizarre as the episode was, it was just one chapter in the story of Prince Mohammed, the ambitious young heir apparent determined to shake up the power structure not just of his own country but of the entire region. At home, he has jailed hundreds of fellow princes and businessmen in what he casts as an anticorruption drive. Abroad, he has waged warinfo-icon in Yemeninfo-icon and confronted Qatarinfo-icon.

The day Mr. Hariri was ordered to report to Riyadh, he was just a pawn in the crown prince's overall battle: to rein in the regional ambitions of Saudi Arabiainfo-icon's longtime rival, Iran.

Photo

A poster of Mr. Hariri in Lebanon during his absence. Many Lebanese believed he was being held in Saudi Arabia against his will. Credit Diego Ibarra Sanchez for The New York TimesThis is the back story of Mr. Hariri's long, strange sojourn in Saudi Arabia last month, as revealed in behind-the-scenes accounts from a dozen Western, Lebanese and regional officials and associates of Mr. Hariri.

Bold Moves Backfire

After delivering his speech, as his bewildered aides tried in vain to reach him from Beirut, Mr. Hariri did, indeed, eventually spend the evening in the desert with the crown prince, one senior Lebanese official said.

It was a surreal counterpoint to a series of events unfolding that day and into the night that set the entire Middle Eastinfo-icon on edge: a missileinfo-icon fired at Riyadh, the hundreds of Saudi princes and businessmen arrested, and Lebanon left stunned and confused.

Prince Mohammed had already launched a war in neighboring Yemen against Iran-aligned rebels, and gotten bogged down. He had blockaded Qatar, only to push the gulf country closer to Iran.

Now, he was looking to take out the prime minister of another country, one who was deemed not sufficiently obedient to his Saudi patrons. The prince intended to send a message: It was time to stop Iran's Lebanese ally, Hezbollahinfo-icon, the powerful Shiite organization that is Lebanon's most influential political actor, from growing still stronger.

The prime minister's monthlong saga was another example of a brash new leader trying to change the way Saudi Arabia has worked for years, but finding that action often results in unintended consequences, especially in such a complicated region. Now, Mr. Hariri remains in office with new popularity, and Hezbollah is stronger than before.

Saudi Arabia's heavy-handed -- arguably clumsy -- tactics alienated even staunch allies like the United Statesinfo-icon, Kuwaitinfo-icon, Jordaninfo-icon, Egyptinfo-icon and much of Mr. Hariri's Lebanese Sunni party. Saudi Arabia may yet clinch some modest concessions from Lebanon, officials and analysts say, but ones perhaps not worth the diplomatic storm.

The officials who described the saga were granted anonymity to speak freely about events that were highly secret and, for Mr. Hariri, deeply troubling and embarrassing. Some gaps in the story remain, given the intense pressure to keep quiet and the fact that no one person is privy to all the details -- except, perhaps, Mr. Hariri, who rescinded his resignation immediately after an international diplomatic scramble brought him safely home.

Mr. Hariri did not respond to multiple requests for comment; he has said publicly that he acted freely and wants to put the Riyadh episode behind him. A senior Saudi official said in a statement only that Mr. Hariri was "treated with the utmost respect," resigned of his own accord, and remains an "honored friend" with the kingdom's support.

The Saudi moves that started on Nov. 4 came in rapid-fire succession. In the spaceinfo-icon of little more than a day, the Saudis extracted Mr. Hariri's resignation; accused Iran and Lebanon of an act of war after Yemeni rebels fired a missile at Riyadh; and rounded up the princes and businessmen on opaque corruptioninfo-icon charges. A week later, they ordered Saudi citizens to evacuate Lebanon.

The burst of contentious actions sent war tremors across the region.

With anxieties running high, Lebanese officials worked to head off what they feared was a long-range plan by Saudi Arabia to destabilize Lebanon's volatile Palestinian refugee camps. There were even concerns in Beirut that Saudi Arabia or its Lebanese allies were seeking to form an anti-Hezbollah militia in the camps or elsewhere, two senior Lebanese officials and several Western diplomats said. No such plots came to fruition, and the Saudi official said none were even considered.

Western and Arab officials say they are still puzzling over what the Saudis hoped to accomplish with all this intrigue. Several do not rule out the possibility that they aimed to foment internal unrest in Lebanon, or even war.

What is clear, they say, is that Saudi Arabia sought to instigate a broad realignment of Lebanese politics to reduce Hezbollah's power by forcing the collapse of Mr. Hariri's coalition government, which includes Hezbollah and its allies.

But crafting the nimble and activist foreign policyinfo-icon that Prince Mohammed wants requires "a depth of understanding of political dynamics in other countries and an investment in diplomatic ties that can't be created overnight," said Brian Katulis, a senior fellow at the Center for American Progress in Washington.

"The competition for power and influence in today's Middle East has changed significantly," he said, "and the Saudis are playing catch-up, with very mixed results."

This risks miscalculations and escalations in a region rived by wars and tensions, he said.

Pressure Points

Trouble had been brewing for years between Mr. Hariri and the Saudis.

Like his father, Rafik, before him, Mr. Hariri owed his political career and considerable family fortune to Saudi backing. But the Saudis grumbled that Mr. Hariri's government was giving too much sway to Hezbollah, which is both a political party and a militant group not answerable to the state.

Mr. Hariri visited Riyadh in late October, and believed he had made the Saudis understand his need to compromise with Hezbollah to avoid political deadlock, officials said. Back in Beirut, to placate the Saudis, he asked Hezbollah's leader, Hassan Nasrallahinfo-icon, through intermediaries, to tone down his blistering speeches against Saudi Arabia's devastating war in Yemen and Prince Mohammed personally.

That same week, a Saudi minister known as a firebrand on Iran, Thamer al-Sabhan, warned Lebanon of "astonishing" developments on the horizon and accused Hezbollah of making war on Saudi Arabia.

On Nov. 3, Mr. Hariri met with a senior Iranian official, Ali Akbar Velayati, who then praised Iran's cooperation with Lebanon. That may have been the last straw for the Saudis.

Within hours, Mr. Hariri received a message from the Saudi king -- Come now -- ahead of a meeting that had been scheduled days later, a senior Lebanese official said. A well-connected Lebanese analyst, Johnny Munayyer, said the prime minister was invited to spend a day in the desert with the prince.

But when he landed in Riyadh, Saudi officials took Mr. Hariri to his house and told him to wait -- not for the king, but for the prince. He waited, from 6 p.m. to 1 a.m. No one came.

The next morning, he was summoned to meet the prince. There was no customary royal convoy, so Mr. Hariri took his own car. And instead of meeting the prince, officials said, he was manhandled by Saudi officials.

Lebanese officials described the long hours between the arrival and the resignation as a "black box." They said they were reluctant to press Mr. Hariri for details. When asked, one of them said, Mr. Hariri just looked down at the table and said it was worse than they knew.

Saudi Arabia had many pressure points to use against Mr. Hariri. It could threaten to expel the 250,000 or so Lebanese workers in Saudi Arabia, damaging Lebanon's economyinfo-icon. And since Mr. Hariri is a dual Saudi citizen, with extensive businessinfo-icon dealings in a country where kickbacks are endemic, they could threaten him personally. An Arab diplomat said Mr. Hariri was threatened with corruption charges.

The prime minister was handed a resignation speech to read, which he did at 2:30 p.m. from a room an official said was down the hall from the prince's office. The text blamed Hezbollah and claimed his life was in danger; it used words that associates said did not sound like him.

Hours later, the Saudi authorities began their corruption roundups, detaining two of Mr. Hariri's former business partners, a reminder of his own vulnerability.

Unrealistic Expectations

In Lebanon, Western diplomats and Lebanese officials said, the Saudis expected the resignation would be taken at face value and bring about a mass outpouring of popular support from Hezbollah's opponents. Instead, Lebanon reacted with mass suspicion. No one took to the streets. And Lebanon's president, Michel Aoun, a Hezbollah ally, refused to accept the resignation unless Mr. Hariri delivered it in person.

After disappearing for hours, Mr. Hariri made his first known call to Mr. Aoun, who realized that the prime minister was not speaking freely. Lebanese officials began making the rounds to puzzled Western diplomats with an unusual message: We have reason to believe our prime minister has been detained.

Mr. Hariri, the officials said, was eventually placed with Saudi guards in a guesthouse on his own property, forbidden to see his wife and children. Within days, several Western ambassadors visited him there. They came away with conflicting impressions of how free he was. There were two Saudi guards in the room, officials said, and when the diplomats asked if the guards could leave, Mr. Hariri said no, they could stay.

Lebanon's internal intelligence chief, Gen. Abbas Ibrahim, put it this way to envoys who could not quite believe a leader could be forced by foreign officials to resign, a senior official said: "It's simple: I could bring two soldiers and put you on TV saying you hate your country."

Meanwhile, the Saudi prince, apparently undaunted by international concerns, summoned yet another leader, the Palestinian president, Mahmoud Abbas, and issued instructions on Palestinian politics. Officials differ on what Mr. Abbas was told in Riyadh. But Lebanese officials were alarmed. They dispatched General Ibrahim and a Palestinian envoy to Amman, Jordan, to debrief Mr. Abbas, three senior Lebanese officials said.

Concerns were high for several reasons. The Saudi recommendations to Mr. Abbas could destabilize the fractious Palestinian refugee camps in Lebanon, a senior Lebanese official said. Separately, a Lebanese ally of the Saudis had urged jihadist factions in one Palestinian camp to form a "Sunni resistance" militia to counter Hezbollah -- an idea so dangerous that the jihadists themselves refused, Lebanese and Palestinian officials and a Western diplomat said.

The Saudis and Mr. Abbas's spokesman denied the accounts.

On a visit to Washington soon after Mr. Hariri's televised resignation, Mr. Sabhan, the Saudi minister of gulf affairs, got a withering reception, Western and Arab officials said, from David M. Satterfield, the State Department's acting assistant secretary for Near Eastern Affairs. He demanded that Mr. Sabhan explain why Riyadh was destabilizing Lebanon.

Intense diplomacy followed by Franceinfo-icon, the United States, Egypt and other countries, producing a deal that allowed Mr. Hariri to leave Saudi Arabia.

But Prince Mohammed sent him home with a task: to get Hezbollah to withdraw its fighters from Yemen, Lebanese officials and Western and Arab diplomats involved in the deal said. That demand proved, the Western and Arab diplomats said, that the prince was not well-informed on Yemen, sometimes called "Riyadh's Vietnaminfo-icon." Hezbollah, a Western diplomat said, had only about 50 fighters in Yemen, with Iran playing a much larger role in training and aiding the Houthi insurgents there.

To end the war in Yemen, a Lebanese official said, Beirut is "the wrong P.O. box."

Riyadh did get something out of the turmoil. Lebanese officials are seeking a deal with Hezbollah that could include toning down Hezbollah's anti-Saudi rhetoric -- as Mr. Hariri requested even before the Riyadh episode -- and shuttering a pro-Houthi television station in Beirut.

It remains unclear if Mr. Hariri can deliver enough to placate Riyadh. Mr. Nasrallah's speeches have omitted critiques of Prince Mohammed lately, and on Wednesday, he called for peace talks in Yemen, a major step.

Then again, on Tuesday, Yemen's Houthis fired another missile at Riyadh.

The story was first published Here