This paper presents a comprehensive economic analysis of recycling organic wastes through composting. A mathematical programming model is developed to examine the optimal level of compost production from sources of organic municipal solid waste, livestock manure and wastewater-treatment sludge. The model incorporates the spatial nature of the problem by referring to the locations of the sources for raw organic matter, of the composting plants and agricultural regions. Agricultural demand for compost is derived using estimated production functions for 42 crops, price elasticity of the vegetative agricultural outputs, and farmers' stated willingness to utilize compost. The model accounts for the costs of waste collection, compost production, transportation and landfilling; all include both direct costs and externalities. The optimal allocation of raw materials and outputs is achieved when the financial contribution of the composting system is maximized relative to the alternative of disposing of these organic wastes in landfills. We apply the model to the case of Israel. Today, despite the relatively high levels of organic material in municipal solid waste, the scarcity of landfill sites, and the low level of organic content in agricultural soils, only 37% of Israel's composting potential is realized. Subject to compliance with new environmental regulations, our analysis points to the possibility of an 89% composting rate, in which all livestock manure and sludge are composted, but only 75% of the organic municipal solid waste is utilized in this manner. This finding supports the strict enforcement of these environmental regulations, and indicates the need for a composting encouraging policy. However, regulations aimed at increasing the rate of municipal solid waste recycling should leave enough freedom for municipalities to select their waste disposal strategies. It is also concluded that, given the high costs of separating municipal waste at the 2 source, the government can increase composting rates by initializing and stimulating the formation of regional cooperation to ensure steady long run consumption of raw organic materials. Moreover, the government can increase agricultural demand for compost by both setting clear standards for high quality compost, and spreading the scientific information on the advantages of composting via the governmental agricultural instruction system. The presented methodology is applicable to other cases, as is the scientific-based data, which include the external costs and the compost production functions. This information is relevant for regions facing the same challenges, particularly where the soil's organic content is less than 2%; e.g., Portugal, Spain, Italy and Greece.