IN 1998, WHEN Atal Bihari Vajpayee took the helm of the world's largest democracy, nobody predicted the extent of his success or his alignment with U.S. interests. His Hindu nationalist party seemed likely to exacerbate tensions with India's non-Hindu minorities, inflame relations with Muslim Pakistan and generally make India an awkward international partner -- a prospect that appeared to come true a few months into Mr. Vajpayee's tenure, when his government defied the world by detonating five nuclear bombs. Six years later, however, Mr. Vajpayee has improved relations with Pakistan, gone out of his way to forge an alliance with the United States and advanced the remarkable program of liberalization that has turned India into a star economy. But if all that was unexpected, so was yesterday's news. Having called an early election to capitalize on his apparently robust popularity, Mr. Vajpayee lost.

Although the reasons for this upset will grow clearer as voting data are analyzed, the dominant theory is not encouraging. Mr. Vajpayee is said to have been punished for the pro-market reforms that fostered India's high-tech boom; voters in the villages felt left out and took their revenge at the ballot box. This suggests that even the world's most successful economic reformers run big political risks. India conducted poverty surveys in 1993 and '94 and again in 1999 and 2000; over that period, the rural poverty rate fell from 37 percent to 30 percent, so the idea that the villagers have not benefited from India's growth is spurious. Given India's continued boom since 2000, poverty in the villages has almost certainly fallen further. Mr. Vajpayee apparently got no thanks for this.

India will now be governed by a coalition dominated by the Congress Party, the political vehicle of the Gandhi family. The current Gandhi is Sonia, the Italian-born widow of the assassinated former prime minister Rajiv, who was himself the son of the assassinated former prime minister Indira, who was the daughter of the former prime minister Jawaharlal Nehru, who led the country for 17 years until his peaceful death in office. Mrs. Gandhi and her colleagues can be expected to pursue her predecessor's rapprochement with Pakistan; on the economy, the new rulers are likely to offer less continuity, though the difference may be partly rhetorical. Mr. Vajpayee's reforms are too entrenched to be rolled back, but progress in areas such as the privatization of lumbering state-run industries may decelerate.

The sharpest discontinuity is likely to come in relations with the United States and possibly with U.S. allies such as Israel. India has become a leading customer for Israeli weapons technology. With Mr. Vajpayee in office, the Bush administration hoped that India might be persuaded to send peacekeepers to Iraq -- a remarkable shift from the Cold War, when India proudly led the Non-Aligned Movement and seized every opportunity to tweak American leadership. The Congress Party-led coalition is expected to swing back to traditional anti-Americanism, sounding off against the United States at the United Nations and perhaps challenging U.S. influence in the Middle East by launching its own peace initiative. All of which would test the Bush administration's reserves of forbearance and tact. But then again, who knows? India's democracy excels at defying expert predictions.