Prosecutors said that Mr. Garcia walked into a Sears store at the Woodfield Mall in Schaumburg, Ill., which is about 30 miles northwest of Chicago , at about 2:20 p.m.

He did not touch or buy anything before exiting the store, prosecutors said. Four minutes later, he crashed his black sport utility vehicle through the store’s glass and steel entrance.

The shattering glass sounded like multiple gunshots and caused shoppers to first think there was an active shooter, a statement from the Cook County State’s Attorney Office said. More than 100 emergency calls were received by 911 dispatchers.

Surveillance cameras captured the chaos as people ran and jumped to evade the vehicle, prosecutors said. A train attraction, the Woodfield Choo Choo Express , which was transporting children through the mall’s common area, was nearly struck, and stores sheltered patrons and locked their gates, the statement said.

Mr. Garcia drove through the mall, shattering glass and striking multiple structural pillars, until two off-duty police officers pulled him out and detained him.