According to Leonard Maltin, the film was adapted by author Joseph Wambaugh without any studio interference. Halliwells said the picture was made exactly on his (Wambaugh's) terms.
The film was financed by director Harold Becker, screenwriter Joseph Wambaugh, and many of Wambaugh's friends, which allowed them to have total creative control.
As part of research for the script, co-writer Eric Roth went out on police cruises with the LAPD, only to have the car, in which he was riding, shot at by a street gang member on one outing.