Riparian areas are located between streams or rivers and dry upland areas. They help maintain water quality by trapping sediment, reducing erosion, storing nutrients, and filtering contaminants. Livestock seeking water and shade in riparian areas can lead to overgrazing, trampling, soil erosion, and declining water quality, reducing habitats for plants and fish. Some farmers are paid to protect riparian areas by keeping livestock out in order to maintain the key ecological functions of these areas.