At least 55 people have been killed and nearly 100 injured in a suicide bomb attack on a mosque in north-west Pakistan, local officials say.
The attack took place during prayers in the Darra Adam Khel area, near Pakistan's tribal regions
Hours later, grenades thrown into a second mosque, near Peshawar, killed at least two people, police said.
It was not immediately clear who carried out the attacks, the latest in a series of mosque and shrine bombings.
The Pakistani Taliban have claimed responsibility for such attacks in the past and have been particularly active in recent years in and around Peshawar.
The BBC's M Ilyas Khan in Islamabad says the Darra Adam Khel bombing may have been a response from pro-Taliban militants to recent military offensives in the area.
In the later attack, unknown assailants threw hand grenades into a mosque during evening prayers in the village of Sulemankhel, about 7km (4.5 miles) north of Peshawar, police said.
At least two people were killed and more than 20 injured.
The suicide bombing occurred in the village of Akhurwal, about 45km (30 miles) south of Peshawar.
Witnesses contacted by the BBC said the bomber was on foot. He blew himself up at the main gate of the mosque after Friday prayers had ended and worshippers were coming out of the mosque.
Parts of the mosque roof caved in and the death toll is likely to rise, officials say.
The bomber was thought to have been about 17 years old, a senior local official, Khalid Khan Omarzai, told the BBC.
Ambulances and volunteers ferried the survivors to nearby hospitals. Rescuers said some victims of the blast had been trapped by debris. A number of the injured are in a critical condition.
"The blast tossed me up. I fell down," one man told the Associated Press from his hospital bed in Peshawar. "Later, it was just like a graveyard."
A number of children were among the dead and wounded, medics at Peshawar's Lady Reading Hospital said.
"I had just finished the prayers when there was a big explosion. It was very terrifying. I don't know what happened later. I just fell down," 15-year-old Mohib Ullah told Reuters news agency.
Some reports say the target could have been a local tribal elder, whose house near the mosque was among those damaged. The elder is reported to have encouraged people to take a stand against the Taliban.
It is not clear if he was among the victims. One report said he now lived in Lahore.
The Darra region links up with Orakzai and Khyber tribal regions in the west and has served as a convenient base for militants attacking Nato supply convoys as well as Shia commuters from Kurram.
Friday's suicide bombing is the deadliest in Pakistan since an attack on a Shia Muslim rally in Quetta killed at least 50 people on 3 September.
Last month 25 people were killed in a blast at a shrine in Punjab province. Another attack at a Karachi shrine two weeks earlier killed nine and was claimed by the Taliban.