The teenager accused of carrying out a school shooting in Florida Wednesday was investigated by the state’s child welfare agency after he cut himself in a video he posted to social media.

The Miami Herald obtained records from Florida’s Department of Children and Families and reported Saturday that Nikolas Cruz, 19, posted a video on Snapchat, a social media site, showing him cutting his arms in 2016.

The agency was called to investigate the video. Cruz, then 18, was listed as an “alleged victim” of medical neglect and inadequate supervision; his adoptive mother, then 68-year-old Lynda Cruz, the “alleged perpetrator.”

"Mr. Cruz was on Snapchat cutting both of his arms," the Florida DCF abuse hotline was told in August 2016. "Mr. Cruz has fresh cuts on both his arms. Mr. Cruz stated he plans to go out and buy a gun."

ALLEGED FLORIDA SCHOOL SHOOTER NIKOLAS CRUZ WAS REPORTED TO FBI, COPS, SCHOOL – BUT WARNING SIGNS MISSED

The paper reported Cruz might have been going through a tough time before he cut himself. He reportedly had just split from his girlfriend who was not faithful to him, got into a fight with a person and he allegedly drew a “Nazi symbol” on his backpack, the Miami Herald reported.

The agency’s investigation wrapped up on Nov. 12, 2016. The agency concluded that the teenager had not been mistreated by his mother, was receiving adequate care from a mental health counselor and was attending school.

"Henderson (Mental Health clinic) came out and assessed the (victim and) found him to be stable enough not to be hospitalized," the DCF report said.

His mother died of pneumonia on Nov. 1, 2017.

Cruz was reportedly diagnosed with autism but the claim was never verified.

Michael Alessandri, a professor at the University of Miami, told the Miami Herald Cruz’s autism diagnosis was not the reason he allegedly carried out the massacre.

“It is a terrible, terrible tragedy,” Alessandri said. “I can assure you that autism is not what pulled the trigger for this young man,” he added.

“This is unquestionably an issue of mental illness. Autism is not that. It is a social communication disorder, not a violent disorder.”

NIKOLAS CRUZ COULD PLEAD GUILTY IN FLORIDA HIGH SCHOOL SHOOTING TO AVERT DEATH PENALTY, LAWYER SAYS

The documents provide further evidence that Cruz was a troubled teen before being charged with 17 counts of murder in the Wednesday attack at Marjory Stoneman Douglas High School. At least 17 people were killed in the shooting.

The teenager arrived at the school in an Uber while carrying a bag that contained his AR-15, police said. He is accused of walking through the school’s hallways, opening fire at random people before he attempted to blend in with the other students fleeing the scene. After the shooting, he went to Walmart then to McDonald’s before he was arrested.

Cruz made his first court appearance Thursday afternoon after being charged with 17 counts of premeditated murder. He was ordered held without bond. The teenager reportedly might plead guilty to his crimes in order to avoid the death penalty.

Court documents showed he confessed to the shooting.

The troubled teen began showing what may have been warning signs before his shooting rampage. Cruz’s neighbors told the South Florida Sun-Sentinel he would shoot at chickens while students at the school said he talked about shooting lizards and other small animals. His social media page was filled with pictures of him posing with guns.

A report by BuzzFeed also showed that authorities were called to Cruz’s home at least 36 times over the course of six years.

On Friday, the FBI acknowledged the agency failed to investigate a warning from Jan. 5 that Cruz could be plotting an attack.

"Under established protocols, the information provided by the caller should have been assessed as a potential threat to life," the FBI statement said. "We have determined that these protocols were not followed for the information received by the PAL on Jan. 5."

FBI Director Christopher Wray said the bureau would review what had happened.

The Associated Press contributed to this report.