First, give the leaders their due. Vajpayee and Musharraf have pushed for a rapprochement over the opposition of their bureaucracies. Vajpayee’s important peace overture, a speech in Srinagar on April 18, 2003, was read in advance only by his three closest advisers. Musharraf is similarly driving policy with a few aides and over the groans of much of the Pakistani establishment.

Both leaders have evolved. As a general Musharraf was a provocateur, planning the infamous military operation at Kargil in 1999. But the general is becoming a leader. Despite his many stops and starts, Musharraf has done more to battle extremism and promote reform than any Pakistani leader in the past quarter century. The recent attempts on his life demonstrate that at the very least the extremists think he’s fighting hard against them.

For his part, Vajpayee has consolidated his position, decisively winning a power struggle against his hard-line Deputy Prime Minister L. K. Adavani. As the prime minister approaches his last election and last term (he is 79), he wants to leave a legacy. For Vajpayee, a decent man with honorable instincts, what better accomplishment than a resolution of the 50-year tensions between India and Pakistan

But the focus on personalities does not tell the whole story. The backdrop to last week’s events involves not just two people but two major shifts in the global landscape–the rising costs of terrorism and the benefits of globalization.

For 15 years now Pakistan has found a cheap and effective way to fight over Kashmir–by helping Kashmiri militants in their terror tactics. September 11 changed that game. It stigmatized terrorism and gave India a crucial ally on this issue–the United States of America. Suddenly Pakistan found that supporting terror had become very costly indeed.

But something equally important has happened in South Asia over the past 15 years. India has been transformed by a market revolution. Globalization has come to every part of the country, whether in the form of a call-center job, a Chinese-made toy or American-inspired television shows. Suddenly Indians want to compete. And they are. Last year India’s economy was the second fastest growing in the world, at 7.4 percent. Its business leaders speak confidently of becoming global players in their fields. In this Indian future, a continuing cold war with Pakistan is a drag.

During the same period, however, Pakistan went down a different path, one of radical Islam and domestic dysfunction. The results? In 1985, its per capita GDP was 6.5 percent higher than India’s; today it’s 23 percent lower. Its birth rate is soaring at a frightening 2.8 percent, while India’s is 1.7 percent and dropping. Thirty percent of Pakistan’s economy is consumed by its military.

Musharraf has broken Pakistan’s fall. And he realizes, now, that to modernize Pakistan he needs peace with India. But the country is proving hard to turn around; the rot has set in deep. And yet, as Shekhar Gupta, one of India’s smartest pundits, has noted, peace will be a success only when Pakistan is a success.

Here is the lesson: to stop a country from encouraging conflict, place high costs on such behavior. But to truly change, that country must also see a positive future. This is what is lacking in the Middle East. Arab countries that fund and foment terror should know that the costs of doing so have risen. But they must also see a vision of prosperity–and grasp it as India has. So far, too few Arabs believe they can master this globalized world.

Last week, however, we have had one small, encouraging counter-example. It turns out that Libya’s decision to renounce its nuclear program was crucially pushed by Kaddafi’s son–trained at the London School of Economics–who urged his father to help Libya rejoin the world and the world economy. The father could see only the stick. The son also saw the carrot.