Pakistan seems set for a tug-of- war between the military and the mullahs after voters confounded the political strategy of General Pervez Musharraf in the first general election since he seized power in a bloodless coup three years ago.
The so-called King's Party, the breakaway Muslim League Quaid-e-Azam, was heavily endorsed by General Musharraf but failed to win the slim majority that analysts predicted. Now there is no guarantee of a compliant prime minister to oversee a five-year transition to democracy.
President Musharraf apparently forgot to factor in the Islamic fundamentalists when he was tinkering with the constitution and fragmenting the mainstream moderate parties of the two leading political players – the former prime ministers Benazir Bhutto and Nawaz Sharif.
Previously, those noisy Islamic fringe groups would sling as much venom at each other as against the military leader, and could be largely ignored. But six of the conservative religious parties recently united on an anti-Western platform and stunned observers by emerging as a dominant force in the borderlands near Afghanistan.
The Muthahida Majlis-e-Amal (MMA), an unprecedented coalition that contains openly pro-Taliban groups, surged ahead in the Northwest Frontier Province and Baluchistan. Voter turn-out in rural areas was higher than in the cities, where low-key campaigning failed to capture the public's imagination and a holiday on election day tempted many to stay away. In a hung parliament, the clerics may play a pivotal role in Islamabad as well.
A vote for the MMA was seen as a protest against General Musharraf's co-operation with Washington's war on terror, and his crackdown against religious extremists in Karachi. Allowing US forces to use military bases inside Pakistan as staging posts for the Afghan campaign rankles with the clerics. So does General Musharraf's end to covert support for Muslim militancy fighting in Indian-held Kashmir at the behest of Washington.
Qazi Hussain Ahmed, the MMA spokesman, said in an interview: "Musharraf no doubt is caught in a difficult position, but he is giving up our soveriegnty. We used to look to America for liberation. It was not detested, but considered a force for freedom."
By gaining the Baluchistan and the Northwest Frontier provinces, the Islamic alliance now controls the territory where many al-Qa'ida and Taliban fugitives are believed to be hiding, possibly including Osama bin Laden.
Benazir Bhutto, barred from running for a third term by presidential decree because she was convicted of corruption charges while in self-imposed exile, ruled out a purely pragmatic alliance with the MMA to form a government. Her Pakistan People's Party gained seats in its traditional stronghold of Sindh and in parts of Punjab.
Ms Bhutto, speaking from London, assailed the election process. "It was because of pre-poll rigging and tampering with the ballot boxes that religious parties have won," Ms Bhutto told the Islamabad daily The Nation. None the less, she pledged that her party would work with General Musharraf as long as he "remains within the law".
From Jeddah, Nawaz Sharif gloated that the military leader's plans had gone awry. "People have rejected the stooges of the Musharraf government. People have rejected all the amendments prepared by the advisers of Musharraf to keep away the popular leadership from the masses," he said. But his party fared badly; most of his supporters defected to the pro-government party.
The former cricketer Imran Khan, founder of the anti-corruption Movement for Justice Party, was one of the loudest voices denouncing pre-election rigging, saying there were bribes and coercion. Mr Khan saved himself from political oblivion by winning one seat in his home town of Mianwali.
In Washington, George Bush's spokesman, Ari Fleischer, described the election as "an important milestone in the transition to democracy".
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies