The Vidyaranayapura police inspector shot at a habitual offender in self-defence after the latter attacked a police party in a bid to escape on Friday night.
The accused, Nakul, a rowdy with multiple cases against him, was taken to the hospital, where the gun shots were removed from his legs and said to be out of danger.
According to the police, Nakul attacked the house of his arch rival Joseph in a bid to eliminate him on Friday.
The Vidyaranayapra police, who received the information, rushed to the spot and tried to nab him up after a hot chase.
However, in a desperate measure to escape, Nakul attacked one of the constables. In retaliation, inspector Puneet Kumar opened fire at Nakul, injuring his leg.
The police are waiting for Nakul to recover to take him into custody.