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.

An Ohio-based rapper said he received an email from Gavin Long less than an hour before the gunman killed three law enforcement officers in Baton Rouge, Louisiana.

Yarima Karama said in a video posted online that the email included images of a three-page, handwritten letter. The subject line of the email was “manifesto.”

Police say Long stalked Baton Rouge officers on Sunday before shooting six of them in an ambush, killing three — Baton Rouge police Officers Montrell Jackson and Matthew Gerald and East Baton Rouge sheriff’s Deputy Brad Garafola — and wounding three others.

CNN is working to confirm the authenticity of the email with law enforcement. Louisiana State Police said it was investigating the letter and noted other writings were recovered in Baton Rouge but would not confirm whether the shooter authored them.

Karama told CNN that he received the letter at 9:04 a.m. ET.

Authorities said they first received reports of the shooting about 40 minutes later.

The so-called manifesto

Karama says in the video he did not personally know Long but that the two of them had communicated. The rapper promotes himself online and people reach out to him that way.

He would not provide CNN a copy of the letter. Karama sent one page of the letter to BuzzFeed, and he also read from the letter in his YouTube video.

The manifesto’s opening is largely copied from Christopher Dorner, the former police officer who went on a shooting spree in Southern California in 2013.

Much of the document is concerned with police corruption and what the writer sees as the system’s failure to prosecute bad cops.

The writer calls the shooting spree “a necessary evil that I do not wish to partake in, nor do I enjoy partaking in, but must partake in in order to create substantial change within America’s police force and judicial system,” according to Karama’s reading.

The writer also uses a substantial portion of the letter to praise law enforcement — the majority of which, he says, is good — and lists the obstacles police face when trying to do the right thing and turn in corrupt cops.

Near the letter’s end he salutes a handful of cops nationally known for exposing police wrongdoing — including former Seattle police Chief Norm Stamper and Officer Billy Ray Fields.

Long claimed to suffer from PTSD, source says

Long, a 29-year-old black man from Kansas City, Missouri, told friends and relatives that he suffered from post-traumatic stress disorder, a source involved in the investigation told CNN’s Chris Cuomo.

He joined the Marine Corps in 2005, worked as a data network specialist and served in Iraq before being discharged as a sergeant in 2010, according to the U.S. military.

During his five years in the Marine Corps, Long served in Iraq from June 2008 to January 2009, and also spent some time in California and Japan.

He received a handful of awards, including the Marine Corps Good Conduct Medal.

Long had filled a prescription for Ativan, an anti-anxiety drug, as recently as June, said the source, who spoke on condition of anonymity. He also had prescriptions for Valium and the sleep aid Lunesta, the source said.

It wasn’t immediately clear whether anyone had diagnosed him with PTSD.

CNN has filed a Freedom of Information Act request with the military to obtain records about Long’s service. Under Defense Department rules, health records that might include any information on Long’s mental health are considered protected, even though he is dead. The records are part of the criminal investigation.

Valium, like Ativan, is a benzodiazepine — a class of medication with sedative properties that are prescribed for anxiety, insomnia and other conditions.

Symptoms of PTSD can include, but are not limited to, feelings of anxiety, insomnia and nightmares.

Of the more than 2.5 million U.S. military veterans who served in Iraq and Afghanistan, 11% to 20% have PTSD in a given year, the U.S. Department of Veterans Affairs says. That’s a higher rate than the general U.S. population, 7% to 8% of which will have PTSD at some point in their lives, the department says.

A research report on the department’s website says that “although PTSD is associated with a risk of violence, most people with PTSD have never engaged in violence.”

Cosmo Setepenra

Long left a long trail of musings online under the pseudonym Cosmo Setepenra. He legally changed his name to Setepenra last year.

During one of his most recent posts on YouTube on July 10 — which he says he filmed from Dallas — he mentions the July Fourth holiday as a celebration of an uprising against oppressive forces.

Without mentioning Micah Xavier Johnson — the sniper in the Dallas police shootings — by name, he questions why some violent actions are perceived as criminal while others are celebrated.

The attack

Authorities say Long was cold and calculating during his assault, which police described as an ambush.

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

Sunday’s attack on police by Long came nearly two weeks after a police officer shot and killed Alton Sterling, a black Baton Rouge resident, outside a convenience store in the city on July 5.

Sterling’s shooting kicked off days of national turmoil. His death and a July 6 shooting of a black man by police in Minnesota spurred protests across the country. During one such protest on the night of July 7, gunman Michah Johnson shot and killed five police officers in Dallas.

By Joshua Berlinger and Jason Hanna

CNN’s Debra Goldschmidt, Steve Almasy and Brian Todd contributed to this report.