The attack on ANP candidate Haroon Ahmed Bilour's election rally came hours after the military said it would deploy more than 370,000 security forces to polling stations to ensure free, fair and transparent national elections on 25 July.

Twenty people, including Awami National Party (ANP) leader Haroon Bilour, were killed and over 30 others were injured in a suicide attack targetting an election gathering in Pakistan's northwestern Peshawar city on Tuesday. The blast took place shortly before midnight when Bilour along with ANP workers had gathered for a corner meeting in the congested Yakatoot area.

The death toll was initially reported at 13 but it rose to 20 overnight, Lady Reading Hospital's spokesperson Zulfiqar Ali Baba Khel was quoted as saying by Dawn.

Fireworks were being burst as the ANP candidate from PK 78 constituency arrived on the stage when the suicide bomber blew himself up. Bilour suffered serious injuries and was shifted to a hospital where he succumbed to the wounds, reports said.

Bomb disposal squad chief Shafqat Malik said eight kilos of TNT explosive was used in the blast.

Rescue teams and law enforcement agencies have reached the site of the blast and investigations into the incident are now underway.

The Pakistani Taliban has claimed responsibility for the bombing. Mohammad Khurasani, a spokesman for the Pakistani Taliban, said in a statement that they targeted ANP's rally, killing Bilour.

The ANP governed the Khyber Pakhtunkhwa province, of which Peshawar is the capital, from 2008 to 2013. The military waged a major offensive against militants in the Swat Valley in 2009. Islamic extremists killed hundreds of ANP leaders and supporters in attacks around the 2013 election. Bilour's father, Bashir Ahmed Bilour, was killed by a suicide bomber during a meeting in 2012 ahead of the vote.

This is the second terrorist attack on an election rally in Pakistan ahead of the July 25 general election. Earlier in July, seven people including a candidate of the Muttahida Majlis-i-Amal, a gathering of religious parties were injured in an explosion during an election rally near Takhtikhel also in the KPK province.

Tuesday's attack came hours after the military said it would deploy more than 3,70,000 security forces to polling stations to ensure free, fair and transparent national elections on 25 July. That is more than five times the number of troops deployed during the last elections in 2013, when the security situation was much worse.

Major General Asif Ghafoor, an army spokesman, said 371,388 troops — nearly a third of the total armed forces — would be deployed to provide security for the upcoming vote. He said the deployment was requested by the elections oversight body.

He said the troops would provide security at 85,000 polling stations and carry out other elections-related duties. Nearly 1,35,000 of the troops have been called up from retirement, Ghafoor said.

He told reporters the military would not be directly involved in the voting and insisted it remained neutral. "People should vote for the candidate of their choice, without any fear," he added. "Our loyalty is only with Pakistan."

Meanwhile, Pakistan's Chief Election Commissioner (CEC) Sardar Muhammad Raza strongly condemned the attack, reports said.

"This shows the weakness of our security institutions and a conspiracy against transparent elections," he said in a statement.

International and Pakistani rights groups have recently accused the army and its intelligence agency of intimidating media outlets in an attempt to stifle criticism of the military, accused by some of seeking to play a dominant role in the country's politics.

The military has ruled Pakistan directly and indirectly for most of its 71-year history.

The National Counter Terrorism Authority on Monday had told a Senate standing committee that some leading political leaders faced death threats from militant outfits ahead of the 25 July general elections in Pakistan.

The leaders include Pakistan Tehreek-e-Insaaf (PTI) chief Imran Khan, 26/11 Mumbai attack mastermind Hafiz Saeed's son Talha, Asfandayar Wali Khan, and senior leadership of other parties.

With inputs from agencies