High levels of perchlorate were found in the Mojave Desert city’s water supply. Residents have been flocking to grocery stores to buy water, and the school district is prepared to provide students with bottled water when classes resume Monday.

Gov. Arnold Schwarzenegger declared a state of emergency Saturday for San Bernardino County, where the water supply for the city of Barstow was found to be contaminated with a toxic chemical used to make explosives and rocket fuel.

A day earlier, Golden State Water Co. warned residents of the desert town that their drinking water contained high levels of perchlorate, a contaminant often associated with defense and aerospace activities.

Perchlorate, a type of salt derived from perchloric acid, has been found in drinking water in at least 35 states. It can interfere with iodine uptake in the thyroid gland. The thyroid, which releases hormones, helps with proper development in children and helps regulate metabolism.

According to the governor’s declaration, more than 40,000 customers were without their normal supply of drinking water, and several restaurants, hotels and other businesses had to close because of the contamination.