By Elise Labott

Outgoing Yemeni President Ali Abdullah Saleh arrives in the United States this week for medical treatment from wounds he suffered during an assassination attempt last year, or so the story goes.

Saleh left the country over the weekend after being granted immunity as part of a plan, hammered out by neighboring Persian Gulf states and backed by the United States, to ease his grip on power and to end the country's political quagmire.

The deal has drawn wide condemnation from protestors in Yemen who maintain Saleh should be prosecuted for the deaths of hundreds of Yemenis at the hands of his security forces and loyalists since the uprising against his rule broke out last year.

The Arab world, along with the United States, has been looking for a formula of easing the region's overdue rulers out of power while providing a sense of closure to the people who suffered at the hands of their rule. So far, none of them have been quite right: Tunisia's Zine el Abidine Ben Ali snuck out of the country in the middle of the night to Saudi Arabia; Egyptian President Hosni Mubarak is undergoing a trial that has raised questions about fairness in the Egyptian justice system and continues to drain the nation's emotions; and Libya's Moammar Gadhafi found justice at the hand of a vigilante's bullet.

Many diplomats believe helping Saleh find an honorable exit could prove to be the Goldilocks formula. The Arab League has even proposed a similar deal to Syria's Bashar al-Assad. Assad hasn't accepted the offer, but if Saleh's transition goes smoothly, his one final gift to the region could be a model for leaving power that has ramifications beyond Yemen.

Much has been made about the wisdom of welcoming a reviled Arab strongman to the United States, but let's start from two important premises: Saleh truly needs medical treatment and the Obama administration truly wants him out of Yemen before and during next month's elections in his home country.

Despite Saleh's claims that he "feels fine," U.S. officials and Arab diplomats alike say the wounds he suffered during last year's near-fatal bomb blast require the kind of sophisticated medical care not readily available in most countries. While recuperating in Saudi Arabia, Saleh was told New York-Presbyterian Hospital was the best and Saleh wasn't prepared to settle for anything less, several sources familiar with the discussions said.

But the main goal of the United States is to get Saleh physically out of Yemen to allow a modicum of stability and a constructive political process to take hold in Yemen before next moth's election. His flip-flop weeks earlier - first abruptly announcing he planned to leave Yemen, then reversing himself and staying the country - was seen by many as an attempt to continue to meddle in Yemen's political process and keep his opponents off guard.

If that was Saleh's true intention, the Obama White House played right into his hands. Saleh, who has compared ruling Yemen to "dancing on the heads of snakes," was able to draw Washington into a weeks-long nail-biting snake dance over the characterization and terms of his stay.

The initial decision by the Obama administration to allow Saleh's visit was heavily weighted in terms of risks, with only a few possible gains.

Officials were hesitant to allow him to come for a host of factors, not least of which were concerns he could use the visit to shore up his political position and continue to meddle in events in Yemen from afar, and even larger concerns the United States would be seen as letting him do so.

Saleh and his supporters are still believed to wield significant influence in Yemen, and his relatives are still in charge of the country's military and security apparatus.

The White House rightly feared being seen as giving refuge to an Arab autocrat with blood on his hands, potentially putting them on the wrong side of history in the Arab Spring. Yemenis in Change Square have accused the United States of turning a blind eye to the violence in Yemen to protect Saleh, whom the administration has called an important ally in the campaign against al Qaeda.

Welcoming Saleh in Washington could be seen by protestors as confirmation he is still Washington's man. The administration feared that America would bear the wrath of Yemenis even after they left the streets.

In the deliberation, the White House was not immune to comparisons to 1979, when President Jimmy Carter's decision to welcome Iran's ailing shah, Mohammed Reza Pahlavi, to the United States for medical treatment so infuriated Islamic revolutionaries that they stormed the U.S. Embassy in Tehran, taking 52 Americans hostage for more than a year and setting the course for decades of tension between Washington and Tehran.

"This was a face-saving way for him to get out for the elections," a senior U.S. official said about Saleh's visit. "But, no, he's not welcome here beyond his medical stay. And that's the dilemma people have been faced with: how to convey that he's not welcome here permanently, without scaring him off the medical treatment? If we sound extraordinarily churlish about it, he might just decide to stay put in Sanaa. And that would be bad."

In the end, the administration sounded extraordinarily churlish, waffling for days at the highest levels about whether to give Saleh a visa, making him twist in the wind and sending mixed messages in the press. When the White House finally approved the visit, Saleh played down the medical treatment, saying he was leaving Yemen to provide some breathing room to the political process, something many had been pushing him to do for months.

The White House shot back that the trip was for medical purposes only; prompting Saleh to cancel his visit and suggest his absence would imperil stability in the country.

After the initial tug of war over the canceled visit, officials say, a negotiation took place over the past few weeks in which a deal was reached: Saleh gets to come for medical treatment, but with the understanding that his visit is for a limited time.

Saleh seems torn about what will happen after his expected return to Sanaa for the inauguration of the next Yemeni president - whether he would remain in Yemen to run his General People's Congress party and live in exile the a desert oasis of Oman. Diplomats say the sultan of Oman is not sold on the latter idea, for fear of antagonizing the next Yemeni government.

Regardless of whether Saleh hangs around Sanaa or lands in Oman, Yemenis are moving forward. Elections will take place next month and Yemen's new president will have the daunting task of rebuilding the soul of a fractured nation and an economy in shambles. There will be no shortage of need for international assistance.

Edmund Hull, a former U.S. ambassador to Yemen who recently published the award-winning book "High Value Target: Countering al-Qaeda in Yemen," says he hopes the United States can help Yemenis address these vital issues, which have been put on hold while Yemen's chaotic political process transpired.

"There should be no lack of practical ways the United States can show the people of Yemen their engagement is going to be positive and going to be sustained in the future and not going to be defined by this temporary stay," Hull said.

It is here the United States can prove that despite his upcoming visit, Saleh is no longer their man.