Image caption All political parties and groupings are now holding rallies to bolster their popularity ahead of possible elections

As a long stand-off between Pakistan's military, courts and government slowly subsides, election fever has now gripped the country following hints by the government that it will compromise and bring the vote forward from 2013 to this autumn. Writer Ahmed Rashid considers the likely campaign pitches of political parties taking part.

For the past few months the tension between the ruling Pakistan People's Party (PPP) on one side, and the military and the Supreme Court on the other has paralysed the nation's politics, its economy and international relations.

The breakdown of ties between the army and the US has still not been tackled two months after Pakistan cut off relations.

One reason for the lowering of the temperature at home has been a tacit agreement between all parties - including opposition politician Nawaz Sharif - that the PPP will call early elections in an attempt to further defuse the crisis.

New recruits

The military and the courts will find it difficult to dislodge the ruling party just months before an election, while the PPP feels that by calling for early elections, it can live to fight another day.

Image caption Imran Khan is increasingly capturing the youth vote

Nevertheless, the PPP wants to make sure that elections for the Senate - the upper house of parliament which it is expected to win - will take place on schedule in March.

These elections remain a bone of contention because it is presumed that if the PPP wins them, President Asif Ali Zardari would be helped towards winning a second term as president - something that neither the army, the courts, the political parties nor the majority of the public desire.

Many people see elections as a game changer, as much will be expected of the new government to get Pakistan back on the rails. So, every major political party has launched huge rallies across the country in a bid to outdo its rivals in terms of numbers, slogans and finding new recruits.

Former cricketer Imran Khan has had the most impressive bout of rallies, many of them to welcome to his Tehrik-e-Insaf party leading political turncoats from the regime of former President Pervez Musharraf, who are well known for their proximity to the military.

Tens of thousands of young people have also joined Mr Khan - many of them never having shown an interest in politics before - nor having voted before.

Not to be outdone the PPP, and its major allies such as the Muttahida Qaumi Movement and the Awami National Party have all held major rallies in recent weeks. The PPP has defended not so much its record, but more its commitment to democracy and its willingness to stand up to what it sees is the victimisation of the party by the military and the courts.

The PPP's stance against the military may have maintained its diehard support but many people are tired of its inability to fix pressing problems such as power cuts and the lack of jobs and investment.

Relentless disaster

Mr Sharif, a former prime minister and the leader of the Pakistan Muslim League - Nawaz (PML-N) - is involved in a do-or-die attempt to bolster his popularity even as Imran Khan digs into his vote bank of young urban Punjabis.

Image caption Iran is concerned over the safety of Pakistan's Shia community

His brother Shabaz Sharif's management of Punjab as chief minister has been a relentless disaster, culminating in January's death toll of 105 people due to poor quality heart medicines being distributed in government hospitals - while Shabaz Sharif held the portfolio as provincial health minister.

None of this is stopping Nawaz Sharif from touring the country and speaking at rallies. While castigating the military for its interference, he is the only politician to have consistently demanded a resolution to the ongoing civil war in Balochistan province.

A new grouping called the Defence of Pakistan alliance made up Islamic parties, banned militant Islamic groups, retired militant generals and right-wing politicians is helping to revive the chances of the Islamic groups at the polls.

Many of its members are parties and groups - banned either by the government or the United Nations - and for several years the military ensured that they kept a low profile. Their resurgence now is worrying many Pakistanis and the international community and shows a greater interest by the military to produce a coherent right-wing platform that can challenge both the PPP and the PML-N.

One of its members is the banned sectarian militant group Lashkar-e-Jhangvi, whose leaders have been in and out of jail for the alleged killing - which they deny - of members of the Shia community.

Hate rallies

Iran has frequently protested over this group's continued involvement in politics. Their most visible victims - Shia Hazaras living in Quetta - have demanded government protection from attacks to little avail.

The religious parties have enormous depth and support, even if they do need to modernise their thinking

Another participant in the grouping is the banned Lashkar-e-Taiba group which allegedly carried out the 2008 Mumbai bombings (but denies it).

At a recent rally in Lahore, the group's founder, Hafiz Saeed, openly declared his intentions to organise attacks against India and said that he would not allow the government to grant most-favoured nation trading status to India.

Some of their rallies are turning into hate gatherings against minorities. One rally in Rawalpindi, close to the army's headquarters, demanded that Ahmedis - a minority sect - stop praying and vacate their own houses of worship. Their rallies have also carried the picture of convicted murderer Mumtaz Qadri, who killed Punjab Governor Salman Taseer a year ago. They have demanded that more such "martyrs" step forward.

Yet there are also mainstream parliamentary Islamic parties in the alliance such as the Jamiat-e-Islami, which is a branch of the worldwide Muslim Brotherhood party that has just come to power in Egypt and Tunisia and has always fought elections in Pakistan.

As dictatorship ended in these newly emerging Arab democracies, the Brotherhood has carried out a metamorphosis, showing much greater responsibility towards public well-being, the economy, improving secular education and making themselves more people-friendly.

Pakistan's religious parties on the other hand are still deeply mired in the slogans of previous decades, remaining intolerant of minorities and declining to build political programmes that can improve people's lives.

The most popular slogan at their rallies is that Pakistan's defence is only possible through jihad (holy war) - something that has been abandoned by Muslim Brotherhood parties coming to power in the Arab world. For the hardliners, rallies in Pakistan are used as recruitment drives for suicide bombers rather than forums to fight elections.

Even so, the religious parties have enormous depth and support, even if they do need to modernise their thinking towards serving the people as the country slips further and further into poverty, intolerance and a crisis of law and order.

As long as they fail to learn lessons from the Arab Spring, they will remain marginalised inside the country.

Ahmed Rashid's book, Taliban, was updated and reissued recently on the 10th anniversary of its publication. His latest book is Descent into Chaos - The US and the Disaster in Pakistan, Afghanistan and Central Asia.