Sinking back in his armchair, Maulana Shuja ul-Mulk strokes his thick beard with one hand and the fluffy tail of a small toy dalmatian with the other. 'We were surprised by the results,' he admits from a supporter's home in the small rural western Pakistani town of Mardan, 'but we believe in democracy.'

Whether the claim is true or not, the hard political reality is that Mulk and his hardline religious party are now out of power. In the 2002 election, he and scores of other ultra-conservative clerics swept into government in Pakistan's turbulent North-West Frontier Province (NWFP) on a tide of anti-Americanism and resurgent religious enthusiasm, vowing to impose Islamic law. But in last week's national and provincial polls, voters backed secular and liberal candidates and evicted the ruling alliance of religious parties.

The landslide triggered what some are now calling the 'Peshawar Spring'. The term may be a little exaggerated, but, for a troubled town pivotal to the 'war on terror', the normally dour and dusty provincial capital of NWFP certainly wears an unusually cheerful face this weekend. 'You can see it in the way people are walking and talking, even smiling,' said Iqbal Khattak, the editor of a local newspaper. Outside his office, unseasonable warm weather has tricked fruit trees into blossoming early. 'We are having two early springs here: one is the climate, the other the politics.'

In the bazaars and on the streets, change is already visible - and audible. Though the Islamic law bill that the hardliners passed in the provincial parliament was blocked at national level, the clerics were able to ban music in public places or on public transport. Now the sounds of local Pashtun folk music and Punjabi Bhangra are back - first in the street celebrations every evening last week, and then as the province's thousands of bus drivers once again slipped a cassette or CD into the stereos of their overloaded and over-decorated vehicles. 'Now I have music, I love my job again,' said Ashraf Mohmandi, one of the local drivers. 'I can breathe once more.'

For many businessmen the relief is huge. The province's once vibrant entertainment industry has languished for the past five years. With a ban on any advertising showing women, let alone the traditional busty girl with a gun that was once a staple of the traditional giant, luridly painted billboards, the Peshawar film industry, 'Pollywood', has suffered. The province's DVD and CD shops were banned from advertising their wares and became the target of hardcore militants' home-made bombs, which killed dozens of sellers and customers.

'It's a real change for the better,' said Shahbaz Pashtun, who has run a DJ service for weddings and parties since 1999. 'The relief was enormous. Business has been terrible.' Sikander Imran, one of Pashtun's clients, spoke of the 'vibrant underground music scene' in Peshawar. 'Hopefully it will become a bit more overground now,' he said.

In a nearby crowded cafe, three Afghan students proudly claimed to be the first 'tourists' to visit Peshawar under the 'new regime'. 'It's better than Afghanistan,' said Abdullah Mati, 21.

Public concerts are now being planned, newly elected MPs say. According to the University of Peshawar's Professor Shah Jehan, the vote against the religious parties was caused by their failure to implement campaign promises. 'They pledged to be honest, just, ascetic and efficient, and they were none of those things,' he said. 'Most of all they could not bring peace. People are sick of violence and insecurity. They voted for parties they hope will end the turmoil.'

The province is often seen as the epicentre of global jihadi militancy. It borders the violence-racked 'tribal agencies' where Osama bin Laden is believed to be hiding and al-Qaeda has set up training camps, and where the Afghan Taliban have a logistics network. The Pakistani army has launched a series of unsuccessful campaigns to eradicate militancy in these rugged hills and valleys, and hundreds have died in bomb attacks and battles. Last weekend, 80 people were killed in a suicide bombing on an election candidate's office that was linked to sectarian fighting. The agencies are also key logistics and recruiting areas for the Taliban in Afghanistan.

Yet even in these troubled, devout and poverty-stricken areas, voters backed secular and liberal parties, including independent candidates affiliated to the late Benazir Bhutto's Pakistan People's Party (PPP), which won the most seats in the elections. Yesterday, the PPP vowed to curtail some of President Pervez Musharraf's broad powers, including his right to dismiss parliament. They also considered candidates for the next prime minister, the front-runner being Makhdoom Amin Fahim, 68, a Bhutto loyalist reputed to be a consensus-builder.

Shah Jehan said of the results in the NWFP: 'The religious parties fared worst in the places suffering the worst violence.' The violence has regularly spilled over to NWFP itself. In Swat, a highland valley briefly taken over by radicals last year, the religious parties were wiped out in last week's elections despite condemning the militants. On Friday, militants detonated a roadside bomb that killed 14 members of a wedding party.

The Awami National Party, which got the biggest vote in the polls in the province and is set to enter into a ruling coalition at a national level, campaigned with a simple slogan: 'Peace'.

For the secular and liberal parties, victory has an added satisfaction. 'This means that Bhutto died to bring democracy,' said Sardar Ali Shah, a young PPP activist, as he danced in the street in Peshawar to celebrate on the night the election results were released. 'Now we will see stability and development.'

Sadly, neither is inevitable. The province, and particularly its tribal areas, have very low literacy levels, limited communications and almost no serious trade or industry. 'There is nothing, really nothing,' said Hakim Shinwari, of the tribal agencies' chamber of commerce.

The bumper crops in Afghanistan and the deteriorating law-and-order situation in Pakistan have encouraged some farmers to turn again to opium. To the north of Peshawar, significant poppy fields have been replanted this year, local sources said.

And support for the religious parties remains strong. The vote in NWFP was against the incumbents, not necessarily against their project of imposing Islamic law. Qazi Hussain Ahmed, the leader of Jamaat-e-Islami, admitted that the party had failed to break through to the 'Pakistani masses'. but said he was confident 'their time would come'.

Yesterday in Takht-e-Bai, 50 miles north of Peshawar, Maulana Mohammed Qassem, one of the few clerics to keep his seat, rallied the faithful. Standing in the court of his religious school, where nearly 2,000 boys receive free board and lodging and a conservative religious education, Qassem told supporters that they deserved praise for choosing the 'true path' rather than the deceiving promises of 'the rich landlords, the capitalists and the government agents of the Americans'. 'Pray for me as your member of parliament, so that I do not disappoint you,' Qassem told them. 'And pray for our return to power.'

Election factfile

· Suicide bombings and the assassination of opposition leader Benazir Bhutto heightened fears of a bloodbath with predictions of massive vote-rigging and a low turnout if elections went ahead.

· President Pervez Musharraf's ruling party conceded defeat after Bhutto's Pakistan People's Party and former Prime Minister Nawaz Sharif's Pakistan Muslim League won 155 of 268 seats contested. Elections had been postponed from 8 January to 18 February after the chaos sparked by Bhutto's assassination .

· Last November, Musharraf had sacked the country's chief justice and declared a state of emergency. Amid mounting pressure, he designated a successor as army chief in October. On 18 October, Bhutto returned from exile. On 27 December, she and 140 others were killed following a rally in Rawalpindi.