Plants that save water are better adapted to dry environments than plants which waste water. However, if the latter are around, they steal the saved water for their own benefit. Under these conditions water-wasting plants (defectors) have an evolutionary advantage on the water-saving ones (cooperators) and can displace them even from adverse environments, where defectors alone have difficulties to survive. This situation provides a typical instance of the tragedy of the commons. In this work we introduce a model of plant fitness based on the amount of water absorbed and the efficiency in fixing carbon dioxide. We prove that these models indeed exhibit a tragedy of the commons for a range of parameters, and also show that, for certain conditions, the extended distribution of plants on a given area helps cooperators to survive the invasion of defectors by forming clusters.