A suicide bomber ripped through a public rally in north-western Pakistan, killing at least 14 people, including several police officials, amid a surge of violence in the country, officials said on Sunday.

"At least 14 people including five policemen have been killed," Bilal Faizai, spokesman for the provincial rescue department, told dpa. Another 18 people were wounded in the explosion, he said.

The explosion in the Kabal area of Swat valley of Khyber Pakhtunkhwa occurred in front of the police station, where hundreds of people gathered for a demonstration against the surge in militancy in the region.

The rally attracted large crowds from the district. Images and videos on social media showed a speaker mid-speech when a powerful blast triggered panic.

"The suicide bomber blew himself up when asked for a search in front of the police station," a local police official said.

No group has claimed responsibility for the attack, so far.

President Asif Ali Zardari and Prime Minister Shehbaz Sharif condemned the suicide attack. "Terrorists will never succeed in their nefarious efforts to harm peace, national unity and the writ of the state," Zardari said in statement.

Swat valley had had once been under Taliban control between 2007 and 2009 before being driven out in a military offensive.

Nobel laureate Malala Yousafzai was shot there as a teenager by a Taliban gunman in 2012.