A note found in the car of a man charged with spraying deadly gunfire at a Tennessee church made reference to revenge for a white supremacist’s massacre at a black church in Charleston, South Carolina, two years earlier, law enforcement officials told The Associated Press.

Judge Rachel Bell presides over general sessions court Wednesday, Sept. 27, 2017, in Nashville, Tenn., where the court appearance for Emanuel Kidega Samson was rescheduled for Oct. 6, 2017. (Mark Humphrey/AP)

This undated photo provided by Metro Nashville Police Department shows Emanuel Kidega Samson. A gunman entered a church in Tennessee on Sunday, Sept. 24, 2017, and opened deadly fire an official said. Authorities identified the attacker as Samson, 25, of Murfreesboro, who came to the United States from Sudan in 1996 and was a legal U.S. resident. (Metro Nashville Police Department via AP)

WASHINGTON — A note found in the car of a man charged with spraying deadly gunfire at a Tennessee church made reference to revenge for a white supremacist’s massacre at a black church in Charleston, South Carolina, two years earlier, law enforcement officials told The Associated Press.

The note could offer a glimpse into Emanuel Kidega Samson’s mindset at the time of Sunday’s shooting and a possible motive for the rampage, which killed a woman and wounded six other people. The Associated Press has not viewed the note, but it was summarized in an investigative report circulating among law enforcement. Two officials read to AP from the note.

The report said that “in sum and in no way verbatim,” the note referenced revenge or retaliation for Dylann Roof, the white supremacist who killed nine black worshippers at a South Carolina church in 2015 and has since been sentenced to death. It wasn’t clear what precisely Samson is alleged to have written about the Roof shooting, or whether his note contained other important details that might also speak to a motivation or state of mind.

The law enforcement officials spoke on condition of anonymity because they were not allowed to publicly discuss an ongoing investigation. Metro Nashville Police declined to comment, saying it had not released the information.

Samson has been charged with murder, and the FBI and U.S. attorney’s office in Nashville quickly opened a civil rights investigation into the shooting. Neither his public defender nor District Attorney General Glenn Funk immediately returned calls for comment, and spokespeople for the FBI and the U.S. attorney’s office declined to comment on the ongoing investigation.

Police have said Samson, masked and wearing a tactical vest, fatally shot a woman who was walking to her vehicle and then entered the rear of Burnette Chapel Church of Christ and shot six other people, walking silently down the aisles with a .40-caliber handgun. The case immediately called to mind the killings at Emanuel AME Church, in Charleston, South Carolina. But unlike that church, which is mostly black, Burnett Chapel in the Nashville neighborhood of Antioch has a diverse congregation with people of various ethnicities, a detail noted in the report. And church members told investigators that Samson had attended services a year or two ago.

Samson came to the United States from Sudan as a child in 1996 and is a U.S. citizen. Police records say he had expressed suicidal thoughts in June and had a volatile relationship with a woman that twice involved police this year. He made bizarre Facebook posts in the hours before the shooting, including one that read: “Everything you’ve ever doubted or made to be believe as false, is real. & vice versa, B.”

Metro Nashville Police say investigators recovered four guns after the shooting that were bought legally from in-state retailers: the 40-caliber handgun allegedly used in the shooting; a military-style AR-15 rifle found in a case in Samson’s vehicle; and a 9 mm handgun recovered from the church. Police say a relative gave the guns to Samson for safe keeping.

Police say Samson bought a .22-caliber pistol found in his SUV.