At least four people were killed and 23 others injured when two suicide bombers attacked the Judicial Complex in Peshawar on Monday.
Official said all judges remained safe in the attack.
The injured included some low-rank employees of the district judiciary and lawyers. A journalist also sustained minor injuries.
Witnesses said the two suicide bombers succeeded in entering the Judicial Complex and opened fire.
One of them was shot dead by policemen, but the second reached the first floor and detonated explosive packed to his body.
Police personnel present in the surrounding official buildings rushed to the site, while personnel of armed forces blocked the main Khyber Road for traffic and rushed to the site.
After around two hours, officials cleared the site.
Khyber Pakhtunkhwa Information Minister Mian Iftikhar Hussain told reporters that both militants had been killed.
“There was an impression that militants had took refuge inside with hostages, but police have said that they have killed the militant.”
Hussain added that the bombers had planned the attack well. “Even if you have very tight security, they planned to get around it.”
“Security has been improved and we will continue to improve it, but these incidents will continue to happen, and the 20 days leading up to elections will see more activity,” Hussain said.
“The terrorists have not yet found success. Some incidents will continue to happen, and we have to be mentally prepared for this.”
Doctors at LadyReadingHospital confirmed receiving 23 injured people, three policemen among them.
In 2010, a suicide bomber had targeted policemen present at the main gate of the same Judicial Complex. More than 20 people, including five policemen, were killed in the previous attack.