The deceased, identified as Vicky Tyagi, an alleged gangster, was shot multiple times by the shooter, who had entered the Additional District and Sessions Judge's courtroom masquerading as a lawyer, Inspector General of Police (Meerut Zone) Alok Sharma said.
According to the police, the shooter had escaped from a juvenile home last year.
He had shot dead an eye-witness in another court here few years ago, and was lodged in the facility after being declared a juvenile in that case, they said.
Breaching security, the armed man entered the courtroom, which was located on the second floor of the court.
Tyagi was facing trial in the 2011 Barakali murder case in which 8 persons of a family were killed. Police had charge-sheeted 20 people in this case including him.
The victims, including former chairman of Cane Society Udayvir Singh, were killed after the jeep they were riding in was hit by a truck near Barkali village on July 11 that year.