The teenager accused of killing 17 people at a Florida high school on Wednesday has confessed to the shooting, police say, reports BBC.
Nikolas Cruz, 19, said he arrived on campus and began shooting students before abandoning his weapon and escaping, according to a court document.
He has appeared in court charged with 17 counts of premeditated murder.
The FBI has admitted it received a tip-off about him last year.
The attack, at Marjory Stoneman Douglas High School in Parkland, Florida, is the deadliest US school shooting since 2012.
"Cruz stated that he was the gunman who entered the school campus armed with a AR-15 and began shooting students that he saw in the hallways and on the school grounds," according to the court document.
He said he was carrying extra ammunition in a black duffel bag and backpack, it said.
Mr Cruz then discarded his weapon in an attempt to blend in and escape, the documents showed.
He was reportedly able to flee the scene undetected before entering a Walmart and then a McDonalds, and was eventually spotted by police and arrested one hour after the attack.
Mr Cruz had been expelled from the school he has confessed to attacking and some students said they had joked "he's the one to shoot up the school".