Shortly after he was taken into custody, Nikolas Cruz told officers that he was the shooter who entered Marjory Stoneman Douglas High School in South Florida Wednesday and opened fire, killing at least 17 people.

The statement, outlined in Cruz's arrest booking report, was given to authorities after the 19-year-old was read his rights, authorities say.

"Cruz stated that he was the gunman who entered the school campus armed with an AR-15 and began shooting students that he saw in the hallways and on the school grounds," according to the Broward County Sheriff's Office booking report obtained by BuzzFeed News.

The seven-page report does not outline why Cruz decided to carry out the attack; however, he allegedly offered additional details about how it was planned and carried out.

Cruz bought the AR-15 legally in February 2017 and packed additional ammunition magazines for the rifle in a black backpack, according to the booking report.

Authorities say Cruz was spotted being dropped off in an Uber by a school employee, who recognized the 19-year-old as a "former troubled student."

Cruz was described by witnesses as wearing a maroon shirt, black pants, a black hat, and carrying a black backpack and duffel bag as he was "walking purposefully toward the 1200 building" of the school.

"Within a minute, [the employee] heard gunshots and called a 'Code Red,' indicating an emergency on campus," the booking report states.

As students began to run away from the shooting, Cruz told investigators he planned to get rid of the AR-15 and a vest he was wearing with ammo magazines so he could blend as one of the fleeing students.

He was located blocks away by police and identified by witnesses of the shooting, according to the report.