CHICAGO (AP) – The Chicago mayor’s office, police and the body that investigates police shootings closely coordinated their response in the months after a white officer fatally shot a black teenager in 2014, clearly indicating that advisers to Mayor Rahm Emanuel knew within months that the case could be politically explosive.

Thousands of emails were released in response to open-records requests from The Associated Press and other media regarding 17-year-old Laquan McDonald, who was killed in October of last year after being shot 16 times. Few communications from Emanuel’s staff mention him directly, though several refer to him by the acronym “MRE.”

A video of the officer shooting McDonald, which was not made public until more than a year later, on Nov. 24, led to protests and repeated calls for Emanuel to resign. The officer has been charged with murder and pleaded not guilty this week at his arraignment.

Emanuel has denied ever seeing the video prior to its release, a contention many activists have said they do not believe. The emails released Thursday do not appear to contradict Emanuel’s claim, though they indicate serious concern at City Hall that the video could present a major public-relations problem.

Among several officials who had the case on their radar within weeks of the shooting, well before it was widely reported, was Emanuel’s senior legal adviser and head of the city’s law department, Stephen Patton.

On Dec. 9, 2014, he emailed Emanuel spokesman Adam Collins to say the city had not yet been sued over the shooting but that he told his staff “to notify us immediately if and when a complaint is filed.”

The same week, Scott Ando, head of the Independent Police Review Authority, publicly touted by the mayor as uniquely independent in its probes of police shootings, also singled out the case. He sent an email to the mayor’s deputy chief of staff, Janey Rountree, with a link to a website that raises questions about police accounts of the shooting.

Collins sent a flurry of emails about media inquiries about a video of the shooting. His subject line on a Dec. 10, 2014, email to fellow Emanuel staffers included the headline in one Chicago newspaper: “If Chicago police have video of teen shooting, let’s see it: advocates.”

The risk that a publicly released video could blow up not just locally but also nationally was made by lawyers from McDonald’s family who reached out to the city about a settlement in early 2015.

“I submit the graphic dash cam video will have a powerful impact on any jury and the Chicago community as a whole. This case will undoubtedly bring a microscope of national attention to the shooting,” one of the family attorneys, Jeffery Neslund, said in a letter emailed to the city’s law department on March 6. “I submit this particular shooting can be fairly characterized as a gratuitous execution.”

Though the Independent Police Review Authority, or IPRA, is supposed to maintain a distance from police and the mayor’s office, a March 11 email from Ando inquires about forwarding witness interview transcripts to the law department “for their use in settlement negotiations with” the McDonald family.

In May, Collins cautioned IPRA spokesman Larry Merritt to “tread lightly” when asked for an IPRA interview about the case.

“Can anyone do an interview? I think we need to accept some of these opportunities,” wrote Merritt in a May 26 email to top Emanuel aides and Ando. “These stories are getting done with or without us.”

Collins responded, “I completely agree that we need to engage more, but if their focus is on specifics (sic) investigations we should tread very lightly. This is about Laquan McDonald and we should not do interviews about open investigations.”

Also in May, Collins complained to colleagues that the IPRA did not follow his recommendation on how to respond to a TV station about McDonald.

Days before the video’s release, Collins wrote to police and law department representatives urging them to speak with “one voice” on the topic.

Emanuel and Chicago police have been under heavy scrutiny since the city, under court order, released the squad-car video last month. McDonald, who was carrying a folded 3-inch knife, is seen veering away from officer Jason Van Dyke in the video before the officer starts firing.

Months before the video was made public, Emanuel’s administration was well aware of growing outrage about the case. In a late July email exchange, top Emanuel aides worried about the perception of a cover-up and noted recent news stories.

“As you might imagine, the timing and details discussed in the Sun-Times article and growing interest in the McDonald incident has not worked in our favor, and is helping to `stir the pot,”’ Emanuel aide Vance Henry wrote.

By October, Henry noted organizing by community groups around the McDonald case and the fatal shooting of 22-year-old Rekia Boyd by another Chicago officer. He suggested in an Oct. 11 email that officials would be “smart to act timely and strategically” in both cases.

The release of the video set off weeks of demonstrations and forced the resignation of Police Superintendent Garry McCarthy. It also led to an ongoing civil rights investigation of the entire Chicago Police Department by the U.S. Department of Justice.

The city released the emails a day after Emanuel said police must be better trained. His remarks came on the heels of a shooting last weekend by police that killed two people: 55-year-old Bettie Jones, who police said was shot accidentally, and 19-year-old Quintonio LeGrier, who police said was being “combative.” Both were black.

Cook County State’s Attorney Anita Alvarez said Thursday that she has asked the FBI for help investigating the deaths.