Gunfire and an explosion echoed Wednesday as militants attacked India's consulate in the eastern Afghan city of Jalalabad, killing three people in the latest in a string of assaults on Indian installations in the country.