PESHAWAR, Pakistan — A suicide bomber killed 9 people and wounded 29 on a busy road here early on Monday, officials said, in the latest episode of violence as Pakistan moves nervously toward elections scheduled for May 11.

An attacker riding a motorcycle detonated his explosives near the suspected target, a police patrol car, on busy University Road during the morning rush hour, killing a police constable and several bystanders, said Faisal Kamran, a senior police official.

“He was trying to get closer to the target but probably couldn’t get through the rush and exploded just a few feet away from the target,” Mr. Kamran said.

Two of the dead were Afghan trade officials, an Afghan diplomat said on the condition of anonymity. He identified one of them as Qari Bilal Ahmad Waqad, a son of Qazi Amin Waqad, who is a member of the Afghan High Peace Council. The diplomat identified the other Afghan as Mohammad Idrees, a refugee attaché at the nearby Afghan trade commissioner’s office in Peshawar.