Bashir Bilor, a senior minister in the northwest provincial government, said that a man carrying explosives drove up to a district sessions court in the centre of the city in a rickshaw.
"He got down and tried to enter the building but could not do so because of our security arrangements," he said.
"Five people died... The injured included three policemen and two lawyers."
Zafar Iqbal, a senior doctor at Peshawar's main Lady Reading hospital, confirmed that they had five bodies delivered to the hospital, and added that at least 49 people were wounded in the blast.
Peshawar: Blast outside court, 2 killed
At least two people were killed and 10 others were injured in an explosion outside a court building in Pakistan's northwest city of Peshawar.
According to police official Saleem Khan, authorities are still investigating the nature of the blast.
The building at the blast scene housed district and lower level courts.
Islamist militants have staged numerous attacks in Pakistan in recent months, including several in Peshawar.
The city is the main gateway to the tribal belt where al-Qaeda and the Taliban have been facing army offensives.