Rick Daniels lies awake at night worrying about a rusty contraption in a forlorn field, littered with discarded pipes and fire hydrants.

It is the only water pump in Needles that meets state water quality standards, running 23 hours a day to keep up with demand, according to Daniels, the city manager. That’s a thin margin in one of America’s hottest cities, an urban speck in the desert near California’s border with Arizona.

If this lone pump fails, 5,000 residents face the ultimate risk of taps running dry, as temperatures soar past 120 degrees and people need to gulp as much as two gallons daily. In June, a transient person died while sitting on a curb midday, one of about 10 people a year who succumb to heat, city officials say.

Across California and the West, the current drought is causing many wells to dry up, but few other communities are looking at their single water lifeline going to zero.

“We are incredibly vulnerable,” Daniels said. “We are talking about life and death.”

The Colorado River flows right through this isolated historic railroad town, carrying about 6 million gallons every minute. But under western water laws, the city can’t pull a single drop from the river.

Historically, the city has depended on four wells that draw from the river’s nearby aquifer.

That worked fine for decades until late last year, when California’s water authorities notified the city that three of its wells failed to meet state standards because of a naturally occurring mineral — manganese — that affects health. A May citation found the city had violated state water law and ordered a corrective plan by the end of this year.

The city says it can’t afford a fix, which would include a new well for $1.5 million.

So, Needles’ single well works around the clock. The city has three tanks that could keep water flowing for 24 to 36 hours if the pump stops — assuming everything else were to go just right. By comparison, the Metropolitan Water District of Southern California requires its member water agencies to have a seven-day emergency supply.

Needles officials say state officials don’t appreciate their desperate situation and protested that the order could jeopardize public safety. The city wants to keep the decommissioned wells as a backup in case of emergency.

Eric Zúñiga, the district engineer at the State Water Resources Control Board who signed the citations, said the board is encouraging the city to make its system more redundant, either by filtering or treating the bad water or by finding new sources. In an email, he added that his citation does not forbid the city from using wells contaminated with manganese if it notifies customers, but city officials believe they will be forced to physically disconnect them.

It is doubtful that, in an emergency, the city would facilitate a mass casualty event by not somehow supplying water — even contaminated water or water taken unlawfully from the Colorado River. But it has entered unknown territory, a zone of risk where few other cities venture.

Daniels agrees, but adds, “This citation was outrageous, insensitive and out of touch.”