Sandeep alias Bachhi was facing several cases including - murder and attempt to murder registered under the provisions of the Arms Act in Hisar, Hansi and Jind.
Sandeep was shot dead by a man identified as Sajid, a resident of Balsamand village of Hisar district, as he was moving towards the courtroom, they said.
Sandeep succumbed to bullet injuries on the spot, a spokesman of Hisar district police said, adding an Assistant Sub Inspector of Jind police, Gulbir, who was accompanying him also sustained injuries in the firing incident and had been admitted to a hospital here.
"Sajid who opened fire was nabbed from the spot. A case has been registered in connection with the firing incident and the accused is being questioned," the police said.