"Militants fired upon Muhammad Rafi Malla at Pahalpora in Shopian when he was coming out of the mosque after Isha (night) prayers last night," a police spokesman said.
He said Malla was injured in the firing and taken to SMHS hospital here for treatment.
The spokesman said police registered a case and started investigations into the incident.
"During investigation, the identity of the militants who carried out the attack has been established as Inam-ul-Haq Malla alias Waseem and Irshad Ahmad Sheikh," he added.