THE WORLDWIDE surge toward democracy has in recent years encouraged the practice of international monitoring of Third World elections to ensure their fairness. This is how Pakistan's elections now come to be provisionally certified by a corps of international observers, including Americans. There were abuses but, the observers say, not on a scale to alter the official results.

The upshot has its irony. The winner is a coalition with comfortable army ties representing the Islamic and nationalistic elements that used their influence with the army to dismiss the government of Benazir Bhutto last August. In other words, a group with somewhat suspect democratic credentials has used the democratic process to come to power -- and under the seemingly approving eye of the international democratic establishment. This turn in Pakistani politics appears to reflect a popular preference for stabler rule than former Prime Minister Bhutto provided in her 20 months of uncertain power.

By running a reasonably fair election, Pakistan has skirted the threat that its democracy-minded international patrons, including the United States, might diminish their support on that score. But its huge annual American aid and its vital military-political connection to Washington were already in a state of suspension as a result of its precipitate reach for a nuclear bomb. Meanwhile, the Persian Gulf crisis has brought the so-far uncompensated loss of billions in commercial transactions and remittances, plus the assorted perils of participation in the force confronting Saddam Hussein.

Against these nation-shaking cares, the United States faces some vexing complications. In Pakistan Washington has three objectives: to encourage democracy and social progress, to keep Pakistan as a friend and sometime (Afghanistan) strategic partner, and to rein in nuclear proliferation. These goals are in tension: American policy dictates rewarding Pakistan for democratic development by giving aid, but American law dictates punishing Pakistan for its nuclear risk-taking by halting aid. Winning Pakistani cooperation in winding things down in Afghanistan requires a careful incentive-and-persuasion calculus of its own.

What will count most in the end is Pakistan's own judgment on the value of maintaining close Western ties. This is not merely a question of politics for Pakistanis but a question of identity, and it is bound to shape the difficult passage that lies ahead.