The attack took place 200 meters from the Indian consulate, in an area where there are many foreign missions.
Afghan security forces exchanged fire with gunmen barricaded in a house near the Pakistan consulate in the eastern city of Jalalabad after a suicide bomber blew himself up today, officials said.
Nine people, including seven security personnel, were killed and 12 were wounded in the suicide attack and subsequent fighting, they said. Five of the attackers were also killed.
The attack on the consulate, which comes amid efforts to restart the stalled peace process with the Taliban and ease diplomatic tensions between India and Pakistan, resembled an attack on the Indian consulate in the northern city of Mazar-i-Sharif
on January 3.
Witnesses in Jalalabad, the main trade gateway to the Khyber Pass and Pakistan, said heavy gunfire and a series of explosions could be heard and residents and children from a nearby school had been evacuated.
Attaullah Khogyani, a spokesman for the provincial governor, said a suicide bomber had tried to join a queue of people seeking visas to Pakistan and blew himself up after being prevented from entering the building.
Two policemen were killed in the blast, the interior ministry said in a statement.
There was no claim of responsibility.
Last week, a group of attackers barricaded themselves in a house and resisted security forces for about 24 hours after a suicide attack on the Indian consulate in Mazar-i-Sharif.
The group responsible for that attack has not been identified but the incident fuelled suspicion in India about terrorists sponsored from Pakistan
and it cast a shadow over the latest effort to improve relations between the two neighbours.
A senior Afghan police officer said on Tuesday that Pakistan army officers were behind the attack on the Indian consulate
in Mazar-i-Sharif. "We saw with our own eyes and I can say 99 percent that those attackers were from Pakistani military and used special tactics while conducting their operation," Sayed Kamal Sadat, police chief of Afghanistan's northern Balkh province, was quoted as saying.
Tension between India and Pakistan has risen since the attack on its consulate and on an air base in Punjab's Pathankot
that martyred seven security personnel. India has blamed the attacks on Pakistan-based terrorists.
A rare meeting between the foreign secretaries of both countries had been tentatively scheduled for later this week, but it is unclear if it would still happen after the attacks.
Delegates from Afghanistan, Pakistan, China and the United States also met this week to try to resurrect efforts to end nearly 15 years of bloodshed in Afghanistan, even as fighting with the Taliban intensifies.
Pakistan says many Pakistani Taliban terrorists, who are separate from but allied with the Afghan Taliban, and are fighting to bring down the Pakistani state, have sought refuge in Afghanistan from a Pakistani army offensive.
At least 14 people were killed in a blast near a polio vaccination centre in the southwestern city of Quetta in Pakistan today.