We analyze the problem of allocating irrigation water among heterogenous farmers when water supply is stochastic. If farmers are risk-neutral, a spot market for water is e¢ cient; while the oft-used uniform rationing system is ine¢ cient, both ex-ante and ex-post. Indeed, we show that it leads farmers to overexpose to risk, thus making shortages more severe and more frequent in case of drought. We propose instead a regulation by priority classes extending Wilson (1989), and we derive an e¢ ciency result. We characterize the set of farmers that would win or loose from such a reform. We also argue that a system of priority classes may be preferred to a spot market system, because scarcity is easier to manage ex-ante than ex-post, and because this system facilitates the supply of insurance to risk-averse agents.The authors acknowledge funding from ANR under grant ANR-17-EURE-0010 (Investissements d'Avenir program). We have bene…tted from discussions in various seminars; in particular, we thank Dominique Bureau and Katrin Erdlenbruch for useful comments. The …rst author also acknowledges …nancial support from the research foundation TSE-Partnership.