The attack was likely to heighten fears for Pakistan's stability just as it prepares for crucial parliamentary elections and faces a growing threat from Islamic militants.
The bomb went off at a checkpoint in Rawalpindi, just a half-kilometer (a quarter-mile) from Army House. President Gen. Pervez Musharraf was safely inside at the time, his spokesman Rashid Qureshi said.
Mohammed Saeed, a city police official, said the lone bomber walked up to the checkpoint guarding the road leading to Musharraf's office and the residences of top generals and blew himself up.
Interior Minister Aftab Khan Sherpao said two police officers and three civilians were killed and 11 other people, including five police officers, were wounded. The attacker also died.
An Associated Press photographer saw emergency workers remove the torn body of an elderly man killed as he was riding by on a bicycle.
Police said women and children aboard a passing minibus were also among the dead and wounded. Television footage showed schoolbags abandoned on the seats of the vehicle. Its windows were blown out.
Investigators collected body parts and other evidence from the scene, including part of the bomber's head, which had lodged in an overhanging tree.
Fortified army posts on both sides of the checkpoint and the gate to the residence of Gen. Tariq Majid, the army's No. 3 commander, were scarred with shrapnel and spattered with blood.
While there was no claim of responsibility, Pakistan has been rocked by a string of suicide bombings mostly blamed on Islamic extremists.
An attack on the homecoming parade of former Prime Minister Benazir Bhutto on Oct. 18 in the southern city of Karachi killed more than 140 people.
In Rawalpindi, a garrison city just south of the capital Islamabad, two blasts on Sept. 4 killed 25 people and wounded more than 60, many of them on a Defense Ministry bus.
The surge in attacks in major cities has followed Musharraf's decision in July to crack down on militants tightening their grip on areas along the Afghan frontier.
U.S. officials warn that the area has become a safe haven for Taliban militants fighting in Afghanistan and that al-Qaida's leadership may be regrouping there.
Last week, Pakistan sent troops to tackle supporters of a pro-Taliban cleric in the northwestern district of Swat. Officials say four days of violence in the once-peaceful mountain region has left around 100 people dead.
Musharraf, who has survived at least three attempts on his life - including two in Rawalpindi in December 2003 - is widely expected to join forces with Bhutto in a U.S.-friendly alliance, provided her party fares well in January parliamentary elections.
Both are stressing the need for moderates to pool their strength to defeat extremism and terrorism - making them prime targets for Islamic hard-liners who deride them as U.S. stooges.
Extremists are trying hard to secure a "big catch," said Sheikh Rashid, a senior Cabinet minister and close political ally of Musharraf.
"There may be some forces who want to give some big message that they are here, they are in Rawalpindi, they are in Islamabad," Rashid told Dawn News television. "This is a very critical time and critical situation."