It was a riot everyone saw coming. For three months police and protesters had drilled separately to prepare for the worst if the grand jury decided not to indict white policeman Darren Wilson for the shooting death of black teenager Michael Brown.

The governor of Missouri, Jay Nixon, and police chiefs met repeatedly with the leaders of some protest groups that had emerged in the town of Ferguson in the aftermath of the Aug. 9 shooting. Both sides preached peace; both said they wanted to avoid violence.

Away from the meetings, Missouri police were quietly drawing up a plan of action with the FBI, National Guard and other law enforcement agencies in the event that there was an explosion of violence. Protest groups held their own meetings to train protesters on civil disobedience techniques, stock up on gas masks and plan what to do if they were arrested.