Jane Harman, a Democrat who represented California’s 36th District in the U.S. House, is president and chief executive of the Woodrow Wilson International Center for Scholars.

Sergei Lavrov, Russia’s foreign minister, has been a powerful devotee of the Syrian government. But in a sign of waning support for Syrian President Bashar al-Assad, Lavrov said this month that “no one is inviting him to Moscow” should the dictator resign.

Lavrov might consider extending such an invitation — precisely for the dictator to resign. Given Russia’s staunch backing of the Assad regime during its brutal crackdown on civilian uprisings over the past year, Moscow is in a unique position to orchestrate Assad’s departure from power.

The dictator need not end up in Moscow, of course. But wouldn’t it be better to see the Assad family living anywhere outside of Syria if that meant an end to the ruthless slaughter that has already claimed more than 9,000 innocent lives?

Offering Assad immunity to get him out of Damascus may be the best of several less-than-ideal options for stopping the bloodshed in Syria. This strategy proved promising with Yemeni President Ali Abdullah Saleh, who, after backing out of the bargain three times, finally left Sanaa to receive medical treatment in New York.

A Saleh-like immunity deal may not be a perfect model, but the results so far are encouraging. While Yemen is plagued by lawlessness, political violence is subsiding. In February, Saleh’s vice president was confirmed as Saleh’s successor in a widely supported plebe­scite, and the United States maintains the ability to reduce al-Qaeda’s presence there. (This month, for example, airstrikes killed 18 al-Qaeda militants in central Yemen.)

After vetoing two attempts at Security Council resolutions that would have condemned Assad, Russia (and China) finally agreed on March 21 to back a toothless U.N. presidential statement calling for a cease-fire in Syria. But this statement, which carries less weight than a resolution, has had no effect on the ground.

Even though Assad formally accepted the cease-fire proposal of Kofi Annan, the joint U.N.-Arab League envoy, on Tuesday, government violence has continued. In fact, anti-Assad groups reported that about five dozen people were killed in clashes across the country after the cease-fire was announced. (It is, unfortunately, impossible to know the exact number of casualties and attacks since the government has severely restricted the access of international journalists.)

Russia, which has offered political and military support to the Assad regime, has the best chance to broker a deal that would have a real impact. (Remember that thousands of cheering Syrians, waving Russian flags, welcomed Lavrov to Damascus in early February.) And the window to act is closing. Any day now, the United Nations may indict Assad for crimes against humanity.

Ideally, Assad would be tried and held accountable for his brutality. But the associated courses of action, including military intervention or arming an opposition that is not well understood, are problematic. With the death toll in Syria rising daily, the international community must consider imperfect options.

In addition to increasingly coercive sanctions, a Moscow-led immunity deal would not only save many lives but would also be a significant blow to Iran, Assad’s main regional ally. Newly “elected” President Vladimir Putin could use the crisis in Syria to “reset” world perceptions of his country. Negotiating Assad’s exit would go a long way toward restoring Russia’s image as a responsible and crucial global player.

In an indication of the Kremlin’s softening support for Damascus, Lavrov publicly criticized Assad this month and accused the dictator of “making very many mistakes.” Moscow should not miss this opportunity to correct its own.