Researchers have calculated the energy and economic potential of urban solid waste, sludge from water treatment plants and livestock slurry for generating electricity in Spain. These residues are alternative sources of renewable energy, which are more environmentally friendly and, in the case of solid urban waste, more cost effective.