A suspected burglar was arrested Wednesday when he tried to order food at a Costa Mesa restaurant that police say he broke into hours earlier.

Daniel Lee Warn, 28, hadn’t even changed clothes when he returned to the El Pollo Loco in the 1900 block of Harbor Boulevard, police said.

They said that the night before, Warn had crawled into a drive-through window, where a security camera recorded him ransacking a register but not finding any cash.

Police said the video showed him wearing a green T-shirt and a hat emblazoned with a neon-pink face.

Employees at the fast-food outlet called police when Warn showed up around noon Wednesday and stood in line wearing the same hat and shirt, according to a news release from the Costa Mesa Police Department.

The eatery was Warn’s last stop in a two-day burglary spree across Costa Mesa, the release said.

Tuesday morning, police received reports of three burglaries at businesses in the 1900 and 2000 blocks of Newport Boulevard.

In most of those cases, a window was smashed with a brick and cash taken from registers, safes or lockboxes.

Warn burgled one of the businesses twice in one night by taking a cash box at about 1 a.m. Tuesday and returning for a small safe around 4 a.m., police said.

The next night, police added, he smashed the rear glass door of a liquor store on Harbor Boulevard but failed to find any cash before heading to the nearby El Pollo Loco.

Officers arrested Warn, whose last known address is in Bloomington, on suspicion of multiple counts of commercial burglary.

He’s being held in lieu of $20,000 bail at Orange County Jail, and police are investigating any possible ties to other local break-ins.

Court records show that Warn was convicted in a string of burglaries in San Bernardino County starting in 2011.

Most recently, he pleaded no contest to two such charges earlier this year, and a judge sentenced him to two years in prison last month.

Costa Mesa police say Warn was free on post-release community supervision, a program that puts nonviolent offenders under the control of local authorities instead of the state.

The initiative is part of California’s prison realignment, which is meant to ease overcrowding in state lockups.