Water is an essential good for human life but there is controversy on whether it should be allocated using markets. In 1966, the irrigation community in Mula (Murcia, Spain) switched from a market institution, an auction which had been in place in the town for over 700 years, to a system of fixed quotas with a ban on trading to allocate water from the town's river. We present a model in which farmers face liquidity constraints (LC) to explain why the new, non-market institution is more efficient. We show that farmers underestimate water demand in the presence of LC. We use a dynamic demand model and data from the auction period to estimate both farmers' demand for water and their financial constraints, thus obtaining unbiased estimates. In our model, markets achieve the first-best allocation only in the absence of LC. In contrast, quotas achieve the first-best allocation only if farmers are homogeneous in productivity. We compute welfare under both types of institutions using the estimated parameters. We find that the quota is more efficient than the market. This result implies that one should be cautious in advocating for water markets, especially in developing areas where LC might be a concern.