The blast occurred at around the same time that three attackers tried to storm the Chinese consulate in the southern city of Karachi.
Two policemen and the three attackers were killed.
Deputy Inspector-General of Police, Karachi South Region, Javed Alam, confirmed that two policemen and three other unknown persons were killed when a group of terrorists opened fire at them in the diplomatic zone where several foreign missions are located in Clifton area of Karachi.
Around three to four terrorists riding on a vehicle reached the area and started firing and hurled a couple of hand grenades at the police personnel deployed for security of the area.
Director of the Jinnah Hospital Karachi, Seemi Jamali, said that overall, five bodies and one injured have been shifted to the hospital.
Two of the deceased are recognised as the police personnel, but others are not recognised yet, said the hospital director.
The Karachi attack was claimed by a separatist insurgent group called the Balochistan Liberation Army, and did not appear to be connected to the attack on the market in the north western region of Orakzai.
In Orakzai, a suicide bomber drove a motorcycle into a crowd attending a festival and market that attracts people from different religious communities, before detonating his explosives.
No group claimed responsibility.
“It was a suicide blast at the festival that takes place every Friday,” said Abbas Khan, the Assistant Commissioner of the District, said.
Mr Khan said that among the 25 dead were three members of the minority Sikh community and two security officials.
The Geo television channel showed footage of military officials cordoning off the bomb site.
Orakzai was formerly a semi-autonomous part of Pakistan’s ethnic Pashtun tribal area along the Afghan border.
The Pakistani military stepped up operations along the border in 2009 and has managed to clear some areas of militants.
The tribal areas were incorporated into the province of Khyber Pakhtunkhwa in May.
Following the explosion, rescue teams along with security forces have rushed to the blast site and the injured people have been shifted to the nearest hospital.
Several among the injured people were in critical condition, said the hospital sources.
Security personnel cordoned off the area after the blast and launched a search operation.
The nature of the blast is not known yet, and police have launched an investigation into the incident.