Between 2005 and 2010 state actors constructed a centralized piped water system to serve 50,000 rural households in a semi-arid region of Northwest China. However, the intended beneficiaries of this project largely chose not to connect the system, and were often ambivalent towards its success. I explain this ambivalence through Foucault's (2007) engagement with the role of the aleatory in the formation of modern state power. The aleatory is those elements of risk, chance and contingency that cannot be fully controlled, but can be calculated and the adverse effects thereof mitigated through what Foucault calls apparatuses of security. Managing the aleatory was a central moment in the emergence of governmentality as a means of exercising state power. Peasants’ ambivalence towards centralized piped water originates in the success of a previous state-backed improved rainwater-harvesting program that has significantly reduced peasants’ risk of water shortage and placed households in control of risks of water shortage. By improving peasants’ ability to cope with drought, rainwater harvesting decentralized power over and knowledge about household water resources. In contrast, piped water has centralized both power over water, and the risk of water shortage in the hands of state actors, but has interacted with local water markets in ways that empower households to reduce the risk of water shortage from both natural sources and the state. The shifting reconfigurations of the risk of water shortages explain how state power has been extended through water management despite the population's selective engagement with piped water.