(Releads, adds context and Indian newspaper report)
By Rafiq Shirzad
JALALABAD, Afghanistan, August 3 (Reuters) - Insurgents attacked the Indian consulate in Afghanistan's eastern capital on Saturday, killing nine people and reinforcing fears that a bloody regional power struggle will be played out in the country once most foreign troops leave.
Twenty-three people were wounded when checkpoint guards stopped three attackers in a car as they approached the consulate in Jalalbabad city, the office of the governor of Nangarhar province, Gul Agha Sherzai, said in a statement.
Two attackers leapt from the car and a gunfight broke out, while the third detonated explosives. No Indian officials were killed, though the blast badly damaged a mosque and dozens of homes and small shops nearby.
India condemned the attack and, without naming any country or group, blamed outside forces.
"This attack has once again highlighted that the main threat to Afghanistan's security and stability stems from terrorism and the terror machine that continues to operate from beyond its borders," the Ministry of External Affairs said in a statement.
Arch-rivals India and Pakistan have long vied for power and influence in Afghanistan. Many see their struggle intensifying after the departure of most international forces by the end of next year.
Afghans fear the void left by the NATO-led foreign forces could lead to yet another round of bloody external interference in the impoverished and violence-racked country.
Afghan President Hamid Karzai is seen as close to India and strongly opposed to the Taliban, who some say is supported by elements of the Pakistani state, in particular its powerful intelligence agency, the Inter-Services Intelligence (ISI).
The Taliban, which spearheads armed opposition to Karzai's Western-backed government, denied responsibility for Saturday's attack on the Indian mission close to Pakistan's border.
Attacks on the Indian embassy in Kabul - there were two during 2008 and 2009 that together killed more than 50 people - led to accusations by Karzai that Pakistan was attempting to compromise India-Afghanistan relations. He gave no evidence for his assertion, and Pakistan denied it was true.
Earlier on Saturday, India's Mail Today reported that New Delhi's ambassador to Kabul was recently warned that the ISI had paid the Haqqani insurgent network - which is allied with the Taliban - to assassinate him.
"It was a specific alert. A team of security officials was sent to Afghanistan for a security review and it has made some recommendations. Clearly the aim is to pin down our top diplomat so we back off from our work," a senior official told the daily.
Indian foreign ministry spokesman Syed Akbaruddin declined to comment on the report, which was sourced to Indian officials who had seen communication intercepts.
A Pakistani security official dubbed the report "nonsense". "Why would we do such a thing when we are trying to improve economic ties with India?" he said.
(Additional reporting by Hamid Shalizi, by John Chalmers in NEW DELHI and by Katharine Houreld in ISLAMABAD; Writing by Jessica Donati and Dylan Welch; Editing by Ron Popeski)