A thief stole a BMW from an indoor South of Market dealership by driving through a large window. Photo: Google Maps

A thief stole a BMW from an indoor South of Market dealership by driving through a large window.

San Francisco police busted a thief after he allegedly boosted a BMW from an indoor South of Market dealership by driving through a large window — and then later smashed into a parked car, officials said.

The ruckus began at 5:18 a.m. Monday, when the 37-year-old suspect, later identified as San Francisco resident Peter Derouen, allegedly broke into the dealership at 1675 Howard St., said Officer Albie Esparza, a San Francisco police spokesman.

Derouen found a lock box where the business kept the car keys, Esparza said, and after unsuccessfully trying to steal one car, he settled on another, which he drove through the window.

Derouen then allegedly headed into the Tenderloin, where at 5:23 a.m. he slammed into a parked car with a person sleeping inside at Mason and Post streets before fleeing on foot, police said. No one was seriously injured in the crash.

About an hour later, police responded to a domestic dispute between Derouen and an unidentifed woman at an undisclosed location in the city’s Southern District, Esparza said.

When police spoke with Derouen, they came to suspect he was responsible for the car theft and hit and run.

He was arrested and booked at the San Francisco County Jail on suspicion of burglary, two counts of auto theft, felony hit and run, driving on a suspended license, possession of a master vehicle key and possession of stolen property, among other lesser charges.

Chronicle Staff Writer Kale Williams contributed to this report.

Evan Sernoffsky is a San Francisco Chronicle staff writer. E-mail: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky