For the latest news in the wake of the Florida school shooting, read Thursday’s coverage.

PARKLAND, Fla. — The suspect in one of the deadliest school shootings in modern American history confessed to the police that he “began shooting students that he saw in the hallways and on school grounds,” according to a police arrest report released Thursday.

The suspect, Nikolas Cruz, 19, carried a black duffel bag and backpack, where he hid loaded magazines, the report said. He arrived at Marjory Stoneman Douglas High School in Parkland in an Uber at 2:19 p.m. on Wednesday and pulled out a semiautomatic AR-15 rifle, according to details described by the authorities at a news conference on Thursday.

Mr. Cruz also shot people inside five classrooms on the first and second floors of the freshman building. He eventually discarded the rifle, a vest and ammunition in a stairwell, blended in with fleeing students and got away, the authorities said.

After leaving the school, Mr. Cruz walked to a Walmart, and bought a drink at a Subway. He also stopped at a McDonald’s. He was arrested by the police without incident as he walked down a residential street at 3:41 p.m.

“He looked like a typical high school student, and for a quick moment I thought, could this be the person who I need to stop?” said Officer Michael Leonard.

Here are the takeaways:

• Mr. Cruz faces 17 counts of premeditated murder — one for each of the people he is accused of killing on Wednesday in a shooting that was captured on cellphone video by terrified students. He is being held without bond at the main Broward County jail, where he has been placed on suicide watch, according to Gordon Weekes, the county’s chief assistant public defender.

• The AR-15 rifle used in the attack was purchased legally, at Sunrise Tactical Supply in Florida, according to a federal law enforcement official. The arrest report said Mr. Cruz purchased it in February 2017. “No laws were violated in the procurement of this weapon,” said Peter J. Forcelli, the special agent in charge for the Bureau of Alcohol, Tobacco, Firearms and Explosives in Miami.

• The F.B.I. said on Thursday it received information last year about a comment made on a YouTube channel which has been attributed to the gunman, but was unable to identify the person.

• In Florida, an AR-15 is easier to buy than a handgun. Read more on how the AR-15 became one of the weapons of choice for mass killers, and the research that tries to explain the high rate of mass shootings in the United States.

• With this shooting, three of the 10 deadliest mass shootings in modern United States history have come in the last five months. Here is a graphic that records the grim toll of school shootings across the nation.

• A huge crowd gathered at Pine Trails Park in Parkland for an emotional vigil to commemorate the victims, 14 of whom were students. Read more about the victims here. The football team gathered separately nearby, forming a circle and locking hands before praying for a coach and an athletic director who were killed.

• Sign up for the Morning Briefing for news and a daily look at what you need to know to begin your day.