The most critical elections in Pakistan's history are taking place amid an orgy of killings - minority groups, civilians and military personnel have all been targeted by a variety of extremists, writes Ahmed Rashid.
With the number of targeted assassinations of leading politicians expected to increase by the time of the elections in the second week of May, there are no signs that the government or the army are prepared for a deterioration of security.
The sense of instability is not made any better by the worsening economic crisis.
An average of 10 to 20 people a day are being killed in the major cities - Karachi, Quetta, Lahore and Peshawar - as the country is gripped by violence. On a bad day as many as 100 people can be killed by suicide or car bombs.
Those suffering most are the minority Shia population, who are being targeted by Sunni extremists. On 9 March, Christians were attacked and their homes ransacked in a poor locality of Lahore by a rampaging mob.
Pakistan endured one of its worst days of violence on 10 January when 115 people were killed - including 93 Shias belonging to the Hazara ethnic group in Quetta.
A month later on 16 February another 84 were killed and 200 wounded in a similar massacre in the city. For days Shia Hazaras refused to bury their dead and many prepared to leave Pakistan for ever.
The plight of some Hindus, Sikhs, Christians, Ahmedis and Shias has forced many to flee the country as intolerance unchecked by the government escalates.
On 3 March another 50 Shias were killed and over 100 wounded in a massive truck bomb that exploded in a Shia locality of Karachi.
Pakistani Shia naval officers and Shia doctors have likewise been killed. Last year more than 400 Shias were killed in Pakistan by Sunni hardliners. Already more than 200 Shias have been killed in the first two months of 2013.
The killings are being carried out by Lashkar-e-Jhangvi - a Sunni militant group which has already been declared a terrorist organisation.
But the government's only reaction so far has been to place its former leader Malik Ishaq under house arrest. He has been arrested and freed several times before.
Test of democracy
It appears to many Pakistanis that the militants are more powerful than the army or the government.
Yet these elections are critical, for it will be the first time in Pakistan's history that an elected government will hand over power to another elected government.
It will be the biggest test of Pakistan's democracy, but at the same time none of the major political parties is prepared to take on the extremists.
Karachi is dissolving into chaos. It is not only besmirched by the Shia killings, but also by a vicious, multi-sided turf war between ethnic and sectarian groups, mafias and land grabbers.
Almost every day some part of the sprawling metropolis is shut down because of gunfire, murders or citizens' protests.
On 13 March one of the country's top aid workers - Karachi-based sanitation expert Parveen Rehman - was shot and killed in the city.
According to the independent Human Rights Commission of Pakistan (HRCP), at least 2,284 people died in violence in Karachi in 2012.
Meanwhile, journalists continue to be targeted across the country - two were killed within 72 hours in early March.
In Khyber Pakhtunkhwa province the Taliban carries on bombing civilians in Peshawar and attacking army posts in the mountains.
The militants have launched multiple suicide bombers against police stations in populated areas.
On 28 February militants in the north-western tribal areas bombed four boys' schools in the Mohmand agency - bringing to more than 100 the number of schools they have destroyed in the tribal areas since 2011.
In Balochistan a separatist insurgency claims more lives every day.
Not surprisingly there are serious doubts as to how elections will take place in many areas where there is no law and order.
The army has made it clear that it cannot deploy at every polling station and the police appear to be demoralised and unwilling to ensure law and order in many parts of the country.
Electioneering will be muted and large gatherings will be impossible because of the fear of suicide bombings.
HRCP head IA Rehman has pointed out that half of the National Assembly seats fall in "the fear zone" where voters will be too scared to turn out in sufficient numbers or candidates may withdraw.
In other areas candidates may seek endorsement from the extremists to avoid getting killed.
Moreover, according to the constitution, the government must resign by mid-March and dissolve the national and provincial parliaments. It must nominate a caretaker government and a prime minister to oversee the elections.
But such an interim government will be weak and will not be mandated to go after the extremists.
People are asking why the army does not do more.
Army chief General Pervez Kayani says the civilian law enforcement authorities controlled by the Pakistan People's Party (PPP) government needs to carry out its tasks more efficiently.
Gen Kayani says that the army will only act if it is requested to do so by the government - something the PPP is loathe to do because it will show abject weakness just before the elections.
The PPP-led government has over the years allowed the extremists to flourish by refusing to go after them.
Other political parties have given them refuge and covert support.
Almost all the extremist groups have a home in Punjab province, run by the opposition Pakistan Muslim League (PML). It has had no scruples about forging electoral alliances with religious groups known for extremist views.
If the PML comes to power on the back of such alliances, it will be even more unlikely to crack down on them.
Meanwhile, the Asian Development Bank has warned that Pakistan faces a severe balance of payments crisis and would need to borrow at least US $9bn (£6bn) from the IMF before the year is out.
The country's foreign exchange reserves have fallen to cover only two months of imports.
Ultimately elections will take place. So it behoves all parties - the army, the politicians, the police and the media - to ensure that violence is reduced so that the vote is as free and fair as is possible.
But even that looks like a long shot at the moment.