A man set his underpants on fire in a Modesto Walgreens Saturday, prompting a storewide evacuation.

45-year-old Andrew Cheadle reportedly told Modesto police that he had an accident, and when he could not remove his underwear, he attempted to use a lighter to burn them off, according to the Modesto Bee.

Cheadle then tossed the burning underwear in a toilet, extinguishing the fire and generating enough smoke to fill the bathroom. The Walgreens, at Standiford Avenue and Carver Road, was evacuated shortly thereafter, at about 9:20 a.m.

The suspect exited the store after admitting to employees that he had started the fire. Police found and arrested him in a nearby neighborhood, but not but not on suspicion of the pants fire. According to the Bee, Cheadle had two felony warrants issued from Sacramento.

Read Michelle Robertson’s latest stories and send her news tips at mrobertson@sfchronicle.com.