One of the victims, identified as Ankit Dagar, is accused in a molestation case and had come to the court for hearing today, a police officer said.
The other, identified as Arif, turned out to be an attendant at a juice stall outside the court, police said.
The police have identified the accused and teams have been formed to nab them at the earliest, a senior official said.
Suddenly, two motorcycle-borne men, who were wearing helmets, stopped nearby and allegedly opened fire. While the first bullet missed Dagar and hit Arif, the second hit Dagar in the abdomen. The assailants fled the scene by the time security personnel could arrive there, police said.
Both were rushed to Deen Dayal Upadhyay Hospital and later referred to another, where Dagar's condition is stated to be critical, while Arif is out of danger.
The police have registered a case of murder and identified the accused with the help of CCTV footage and what Dagar told police officials while being taken to hospital. He told police that the woman complainant's brother was behind the attack, police said.