Sub-Inspector Altaf was travelling in a car when the attack took place at village Gund Dachina in Aragam area around 1230 hours, causing critical injuries to him, a police officer said.
The ultras were travelling in a load carrier and fled the scene after firing at the police officer.
The injured officer was airlifted to Army's 92 Base Hospital at Badamibagh cantonment where he succumbed to injuries, the officer said.
He said a massive hunt has been launched to nab the militants.
