Police say bombings in two separate mosques in northwest Pakistan have killed at least 12 people.

Sources tell Al Jazeera that 50 have been wounded and many are in critical condition.

Both of the Sunni Muslim mosques were badly damaged, and the roof of one of them collapsed, said tribal police officer Badshah Rehman. The mosques were located in Baz Darrah village in the Malakand district of Khyber Pakhtunkhwa province.

Al Jazeera's Imtiaz Tyab, reporting from Islamabad, said the blasts happened shortly after Friday prayers.

He said the area has had a very heavy military presence since the Pakistan Swat Valley offensive in 2009.

Rescue workers were trying to retrieve the dead and wounded from the debris, Rehman said.

Our correspondent said that some people may be trapped under the rubble of the mosques but the remote area is making it difficult for rescue efforts.

No one has claimed responsibility for the blasts, but suspicion will likely fall on the Pakistani Taliban.

Taliban attacks

The Taliban have been waging a bloody insurgency against the government for years that has killed thousands of civilians and security personnel. The fighters have attacked Sunni mosques in the past.

The Pakistani army has mounted multiple operations against the fighters in the northwest, but they have proven resilient and continue to carry out near-daily attacks.

The Taliban recently launched a series of attacks in the run-up to national elections on May 11 in an attempt to derail the vote. Pakistanis defied the group by coming out in large numbers to cast their ballots.

The attack underlines the challenge of Taliban violence facing a new government led by Nawaz Sharif set to take power.

Sharif's Pakistan Muslim League-N Party was the big winner in the election and appears set to form the next government.

The Pakistan Tehreek-e-Insaf Party, led by former cricket star Imran Khan, is expected to form the provincial government in Khyber Pakhtunkhwa.

Both politicians have called for negotiations with the Taliban, and Khan has even said that Pakistani troops should stop battling the fighters and pull out of areas of the northwest.

Now he will face the challenge of applying his election platform to the challenges of governing one of Pakistan's most violent areas.