The prime suspect in the murder of a 17-year-old in Ghaziabad was killed in a police encounter after opening fire while attempting to flee.