PESHAWAR, Pakistan (AP) — The Pakistani Taliban on Wednesday claimed responsibility for an overnight suicide bombing at a campaign rally that killed a secular politician and 20 others, two weeks before the country's nationwide elections.

Mohammad Khurasani, a spokesman for the Pakistani Taliban, confirmed the militant group targeted a rally of the Awami National Party in the northwestern city of Peshawar. The bombing killed Haroon Ahmed Bilour, a candidate for a seat in the provincial legislature. Another 65 people were wounded.

Islamic extremists grew to despise the Awami National Party when it ruled the Khyber Pakhtunkhwa province, of which Peshawar is the capital, from 2008 to 2013. During that time, the military waged a major offensive against militants in the province's Swat Valley. The militants responded by carrying out a wave of attacks ahead of the 2013 elections, killing hundreds of supporters of the Awami National Party.

Bilour's father, Bashir Ahmed Bilour, was killed by a suicide bomber in 2012.

Thousands attended the funeral prayers for the Haroon Ahmed Bilour at a Peshawar park on Wednesday afternoon, including supporters, political leaders and ordinary citizens. Some held banners praising Bilour and criticizing the government for failing to provide adequate security.

Party chief Asfandar Wali pledged that despite the killing, the Awami National Party remains undeterred.

"They want us out, but we will remain in the political arena and electoral race come what may," Wali said.

The Pakistani Taliban said the attack on Tuesday night was in revenge for the ANP's rule and vowed more such attacks. It called on people to stay away from ANP rallies.

Bilour's family called on his supporters to remain calm.

"I am also ready to sacrifice my life for your rights, but I request you to exercise restraint," Bilour's 16-year-old son Daniyal, who was wounded in the bombing, told supporters at his home.

The attack was condemned by political parties and the government. Caretaker Prime Minister Nasir-ul-Mulk has ordered authorities to ensure peace during the July 25 vote.

On Tuesday, the army said it would deploy more than 370,000 security forces to polling stations to ensure free, fair and transparent national elections. That is more than five times the number of troops deployed during the last elections in 2013, when the security situation was much worse.

Maj. Gen. Asif Ghafoor, an army spokesman, said the troops would provide security at 85,000 polling stations and carry out other election-related duties following a request from the civilian body overseeing the vote. Nearly 135,000 of the troops have been called up from retirement.

The bombing at the rally was the first major attack since Mullah Fazlullah was killed in a U.S. drone strike in Afghanistan in June. The Pakistani Taliban appointed Mufti Noor Wali Mahsud as their new chief shortly thereafter.

___

Ahmed reported from Islamabad.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.