An undertrial and a Delhi Police constable were injured when two men opened fire at the former in a city court on Wednesday. One of the attackers has been arrested, police said.
The firing was the outcome of a gang war, police said.
The attack took place in the capital's Rohini court around noon when police presented Naveen, 25, an undertrial in a murder case, in the court for hearing, a police official said.
"Mukesh, 28, a member of Naveen's rival group, was arrested from the spot. A country-made pistol used in the crime has been recovered," said Deputy Commissioner of Police B.S. Jaiswal.
"Some more people may be involved in the crime. Several people are being questioned," Jaiswal said.
According to police, the rivalry between Naveen and Ashwani, both residents of Narela in outer Delhi, started in 2008 when Ashwani married a girl whom Naveen loved.
In a case of vendetta, Naveen killed Ashwani's brother in 2009, after which Ashwani killed Naveen's uncle. Both were arrested and lodged in Rohini jail.
Both used to instruct their gang members from inside the jail. Several fights took place between their accomplices in Delhi.
"The attack was the outcome of their gang war. Mukesh, who was scared of being killed by Naveen's associates, planned to eliminate him on Wednesday when he came to the court," said Jaiswal.
"Mukesh waited outside the court and shot Naveen in the stomach. Constable Anurag, who was accompanying him, was shot in his ankle," Jaiswal added.
Naveen and the constable were rushed to Babasaheb Bhimrao Ambedkar Hospital in Rohini Sector 3. The condition of the undertrial is stated to be critical.