This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Gavin Long, the man who shot six law enforcement officers Sunday in Baton Rouge, Louisiana — killing three — suffered from post-traumatic stress disorder, a source involved in the investigation told CNN’s Chris Cuomo.

Long joined the Marine Corps in 2005 and worked as a data network specialist, according to the U.S. military.

He was discharged at the rank of sergeant in 2010, after serving in Iraq.

The source also told CNN that Long had filled a prescription for Ativan, an anti-anxiety drug, as recently as June. He also had prescriptions for Valium and Lunesta.

One officer still in critical condition

The officers Long killed were Officer Montrell Jackson of the Baton Rouge Police Department; Officer Matthew Gerald, also with Baton Rouge Police; and Deputy Brad Garafola with the East Baton Rouge Sheriff’s Department.

Deputy Nicholas Tullier was also wounded and is currently “fighting for his life,” Sheriff Sid Gautreaux said.

Authorities say he stalked Baton Rouge police before ambushing a handful of them.

“There is no doubt whatsoever that these officers were targeted and assassinated,” Col. Michael D. Edmonson of the Louisiana State Police said.

Long was killed in a shootout with police Sunday.

National unrest

The Baton Rouge shooting occurred nearly two weeks after Alton Sterling, a 37-year-old black man, was killed by police outside a convenience store in the city. His death kicked off three tragic days in a row — with the death of Philando Castile in Minnesota and the killing of five cops in Dallas — and tense protests around the country that followed.

Long left a trail of writings, videos and social media posts describing his thoughts, ideas and worldview under the pseudonym Cosmo Setepenra. He legally changed his name to Setepenra last year.

In a video posted to YouTube July 10, Long — who says he is speaking from Dallas — mentions the July Fourth holiday as a celebration of an uprising against oppressive forces. Without mentioning Micah Xavier Johnson — the Dallas shooter — by name, he questions why some violent actions are perceived as criminal while others are celebrated.

Baton Rouge cop killer Gavin Long suffered from PTSD, source tells CNN https://t.co/FTZxswACLx pic.twitter.com/XQJ5lFyVmG — CNN International (@cnni) July 20, 2016