Florida shooting timeline shows how the alleged gunman got to the school and where he was arrested

This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A newly released timeline of events shows the accused gunman in the deadly Florida school shooting went to Walmart and a McDonald's after he allegedly killed 17 people.

Nikolas Cruz was picked up by an Uber just after 2 p.m., police said. He was dropped off at Marjory Stoneman Douglas High School and entered a building stairwell with his AR-15 inside a black case just after 2:20 p.m.

By the time he exited the stairwell, he'd removed the rifle. He fired into rooms 1215, 1216 and 1214. He went back to 1216 and 1215, then fired at room 1213 before taking a stairwell to the second floor. He shot a victim in room 1234.

Cruz allegedly went up to the third floor, dropped the rifle and then ran out of the building, officials said. He went toward a set of tennis courts and across a field as students and teachers were fleeing the building.

He was in the building for less than 20 minutes. Cruz allegedly fatally shot 17 people in that time.

By 2:50 p.m., he arrived at a Walmart and bought a drink at a Subway in the store, police said. He left on foot and headed to a McDonald's, where he sat for a short time.

Police found and arrested him about 2 miles away around 3:40 p.m.