Explosions and gunfire rang out late Sunday as militants tried to storm the Indian diplomatic mission in a northern Afghan city, officials said, in the latest assault on an Indian installation.