PESHAWAR - A suicide bomber blew himself up at a Pakistani mosque Monday, killing at least 20 people including a prominent local cleric in the lawless district of South Waziristan, officials said.

It was the first significant suicide attack in Pakistan since August 4 and comes with the country battling to cope with the fallout of devastating floods that have affected up to a fifth of the country and hit 20 million people.

The apparent target was cleric Noor Mohammed, a member of radical Sunni Muslim party Jamiat Ulema-e-Islam, which has been linked to the Taliban, and a former lawmaker.

He was greeting members of the congregation in the town of Wana after prayers when the bomber struck, officials told AFP on condition of anonymity.

The mosque was badly damaged in the blast, where local residents were busy trying to recover people from the rubble amid fears that the death toll could rise further

"The death toll in the suicide attack has risen to 20, with more than 40 people wounded," said one of the officials.

Syed Noor, a nephew of the cleric, confirmed that his uncle had been killed.

A health official in a paramilitary hospital in Wana said condition of most of the wounded was critical.

"We have received 14 injured but there condition was very critical," the official told AFP requesting anonymity.

Locals described the cleric as an influential figure who had several times acted as a negotiator between the Taliban and the Pakistani government, but was opposed to the presence of Uzbek militants, providing support to dislodge them.

Wana is the main town in South Waziristan, one of Pakistan's seven districts in the lawless tribal belt on the Afghan border. Pakistan last year waged a major operation to flush out the Pakistani Taliban from South Waziristan.