(CNN) A school resource officer initially recommended involuntarily committing Nikolas Cruz over mental health concerns about 18 months before Cruz shot students and staff at Marjory Stoneman Douglas High School , records show.

According to documents obtained by CNN, school resource officer Scot Peterson wanted to use the Baker Act on September 28, 2016, after the then-student allegedly made threats against himself and others.

Although two guidance counselors initially agreed with Peterson, two mental health professionals from Henderson Behavioral Health said Cruz didn't meet the criteria for an involuntary committal . The next day, Peterson declined to pursue the committal.

The Baker Act allows mental health facilities to hold a person for up to 72 hours for evaluation. A law enforcement officer, a mental health professional or a Circuit Court judge may involuntarily commit an individual under the act if they are thought to be mentally ill, are refusing a voluntary examination and are thought to pose a threat to themselves or others.

If Cruz had been involuntarily committed under the act, it could have made it difficult for him later to legally purchase a firearm

Florida law at that time prohibited the sale of weapons to someone who had been involuntarily committed, but CNN legal analyst Mark O'Mara said that, while there is a database for Baker Act commitments, that information is not always consulted in gun background checks. The act also had some ambiguities, such as whether a Baker Act commitment prohibits gun purchases forever, or just during the period of incompetency. Recent changes in Florida's law will help address those issues, but are already being challenged as unconstitutional.

Photos: Deadly Florida school shooting Photos: Deadly Florida school shooting Parents wait for news after a shooting at Marjory Stoneman Douglas High School in Parkland, Florida, on Wednesday, February 14. At least 17 people were killed at the school, Broward County Sheriff Scott Israel said. The suspect, 19-year-old former student Nikolas Cruz, is in custody, the sheriff said. The sheriff said Cruz had been expelled for unspecified disciplinary reasons. Hide Caption 1 of 13 Photos: Deadly Florida school shooting Police officers ride in the back of a pickup truck as they tend to a victim. Hide Caption 2 of 13 Photos: Deadly Florida school shooting People are brought out of the Marjory Stoneman Douglas High School after the shooting. Hide Caption 3 of 13 Photos: Deadly Florida school shooting Police officers surveil the exterior of the school while the shooting was active. Hide Caption 4 of 13 Photos: Deadly Florida school shooting Students and faculty are evacuated from the school. Hide Caption 5 of 13 Photos: Deadly Florida school shooting A father and daughter embrace after a mass shooting at the Marjory Stoneman Douglas High School. Hide Caption 6 of 13 Photos: Deadly Florida school shooting Family members wait for word from students beneath an underpass just south of the campus of Marjory Stoneman Douglas High School. Hide Caption 7 of 13 Photos: Deadly Florida school shooting Lavinia Zapata embraces her son, Jorge, after he was evacuated from the school. Hide Caption 8 of 13 Photos: Deadly Florida school shooting The suspect, 19-year-old former student Nikolas Cruz, is taken into custody by authorities. Cruz was apprehended off of the campus. Hide Caption 9 of 13 Photos: Deadly Florida school shooting Security instructs parents following the shooting. Parents were told they would be reunited with their children at a local Marriott Hotel. Hide Caption 10 of 13 Photos: Deadly Florida school shooting Students released from lockdown console each other. While some students were evacuated, many remained in the school until authorities could come to their aid. Hide Caption 11 of 13 Photos: Deadly Florida school shooting Family members embrace after shooting. Hide Caption 12 of 13 Photos: Deadly Florida school shooting People embrace while leaving the Fort Lauderdale Marriott Coral Springs Hotel, which authorities designated as a staging point for witnesses to the shooting. Hide Caption 13 of 13

On February 14, authorities say, Cruz shot and killed 17 students and staff members at his former high school and wounded 17 others. He faces 17 counts of murder in the first degree and 17 counts of attempted murder in the first degree.

'Thinking about using' a gun

The records obtained by CNN document portions of the treatment Cruz received at Henderson Behavior Health from September 23, 2016 to December 30, 2016.

Records show a Stoneman Douglas guidance counselor called Henderson Behavioral Health two days in a row -- on September 28 and 29, 2016 -- due to a report from a peer counselor that Cruz drank gasoline, had suicidal thoughts and said he had a gun and was thinking about using it.

The guidance counselor also expressed concern about Cruz buying a weapon because she knew he had turned 18 on September 24 and had previously expressed interest in purchasing a gun.

A clinician who went to the school on September 28 to assess Cruz noted that Peterson stated he was going to initiate Baker Act proceedings against Cruz, and the two guidance counselors agreed. After meeting with the 18-year-old, the clinician noted that Cruz said he had told someone he drank gasoline but he "was just wanting attention" and he was "not thinking about killing himself." He also denied owning a gun -- except for a pellet gun.

JUST WATCHED Neighbor: School gunman was pure evil Replay More Videos ... MUST WATCH Neighbor: School gunman was pure evil 03:07

The assessment says Cruz "mentioned in school he wanted a real gun but he never reported that he was going to get one." Cruz also said he didn't have an ID, which is required to purchase a gun.

The clinician determined that Cruz "did not meet criteria for further (mental health) assessment," instead recommending that Cruz practice his coping skills and that his mother continue the intervention plan -- which included locking up sharp objects and alcohol and helping Cruz with his coping skills -- such as watching TV, fishing and playing with pets.

A different Henderson clinician visited Cruz and his adoptive mother, Lynda Cruz, at their home later on that same day, and noted that the school reported that Cruz had suicidal ideation.

An investigator for the Florida Department of Children and Families was also at the Cruz's Parkland home on September 28, 2016 to check Cruz's health and well-being, as well as two Broward County Sheriff's deputies, who reported that there were "no signs of mental illness or criminal activity" so they left.

JUST WATCHED Tipster warned FBI of Parkland school shooter Replay More Videos ... MUST WATCH Tipster warned FBI of Parkland school shooter 03:31

The following day, the school guidance counselor again called Henderson Behavioral Health, saying Cruz had written the word "kill" in a notebook. The counselor expressed concern that Cruz might be purchasing a gun. The clinician said his mother was going to get him an ID, according to the documents.

Another clinician visited Cruz and his mother at home that day as well. According to the documents, Lynda Cruz said the school was concerned about her son turning 18 and purchasing a gun.

The documents say Cruz's mother later told a Henderson clinician that she did plan to help Cruz get an ID -- but only so he could use it to purchase pellets for his pellet gun.

She is quoted in the documents as saying that if her son were to get a gun she would feel "comfortable about it" because Cruz "has been respectful of the rules and he understands where guns can be used."

JUST WATCHED School shooter's past 911 calls released Replay More Videos ... MUST WATCH School shooter's past 911 calls released 02:45

The same day, the guidance counselor told the clinician about the school's safety plan for Cruz, which included taking his backpack away and not allowing him to practice target shooting with the school's JROTC marksmanship team. Cruz was a member of the JROTC program.

The clinician's report also said that the guidance counselor reported that the school resource officer now said Cruz did not meet the criteria for initiating a Baker Act commitment. There was no explanation for Peterson's new decision.

In September of 2016, Cruz was on two types of medication, the records show. Both are routinely prescribed for Attention Deficit Hyperactivity Disorder (ADHD). The records make repeated references to Cruz having the neurobehavioral disorder as well as the developmental disorder autism, according to statements made by his adoptive mother, who died in November of 2017.

There are also references to Cruz having obsessive-compulsive disorder, episodic mood disorder, oppositional defiance disorder and a history of aggression.

The massacre in Parkland

Peterson was on duty on February 14, 2018, when Cruz entered the school with an AR-15-style rifle and began shooting. The resource officer later resigned after being suspended for not entering the building where the shots were being fired. Security camera video showed Peterson remained outside beside another building, even though he told emergency dispatchers there were reports of shots fired in building 1200. His attorney later said Peterson thought the shots were coming from outside the building.

JUST WATCHED Hear dispatch audio identifying the shooter Replay More Videos ... MUST WATCH Hear dispatch audio identifying the shooter 00:23

It's not clear exactly when Peterson learned that Cruz was the gunman, but it wasn't until after the shooting stopped that Cruz's name was mentioned in radio communications among law enforcement authorities.

Threats go back 4 years

The trail of documentation chronicling issues Cruz had goes back four years, according to school and psychiatrist records.

Cruz "threatened to hurt others," reads a psychiatric memo written on Cross Creek School letterhead and dated January 17, 2014.

The document, signed by a board-certified child and adolescent psychiatrist, says Cruz was referred for re-evaluation due to his "continued behavioral and socio-emotional problems."

Some of those problems manifested at school and others at home, according to the document.

It goes on to say he was "intentionally doing things that are not OK" and had anger that was hard to control since finding his father dead at home in 2004.

JUST WATCHED Family talks about living with gunman Replay More Videos ... MUST WATCH Family talks about living with gunman 01:12

At school he "threatens to hurt others," is "angry" and has been suspended several times for unruly/disruptive behaviors including insults and profanity. He is attention seeking and annoys others, the document adds.

At home, he cuts out furniture and blankets, keeps "knives and scissors" in his bed, and he seems sad when his brother bullies him, according to the document.

In an interview with Palm Beach County Sheriff's office two days after the shooting, his brother expressed regret for bullying Cruz.

A letter dated September 24, 2013, and used to bolster the 2014 memo, shows a psychiatrist supported Cruz being placed in a "therapeutic residential setting."

The 2014 memo ends by saying that school officials should meet to determine an appropriate educational program for Cruz.

Authorities decline to comment

CNN contacted Henderson Behavioral Health for comment on Sunday but did not get a response. In response to a previous request, Henderson's CEO Steve Ronik said on March 8 that the facility was "unable to share or comment on a patient's treatment because of national and Florida privacy rules."

Attempts to reach the Stoneman Douglas school resource officer, Scot Peterson, through his attorney were not successful.

Broward County Superintendent Robert Runcie told CNN he has not reviewed these reports but that the district does not make the final determination to use the Baker Act on someone.

Cruz's defense attorneys could not be reached for comment.