In parts of Kenya along the Tana River, heavy rainfall has long brought inundation, landslides and losses of homes and property.
But last year's heavy rains brought less destruction for an unexpected reason: Drought-hit areas further upstream have improved their water storage capacity, and are now capturing more of what once rushed downstream.
"Water harvesting actually helps reduce the impacts of flooding, saving the communities from unexpected risks," said Hussein Idhoro, drought coordinator for upstream Tharaka Nithi County.
In the catchment of the Tana River, the partially government-funded Upper Tana Natural Resources Management Project has since 2012 given financial and technical support for the construction of rainwater harvesting dams that today hold up to 100 million litres of water.
The project also has established nearly 325 roof-top water harvesting systems at schools and farms within the catchment, said James Maina, a sub-regional manager at the national Water Resources Management Authority.
The Mukurweini Technical Training Institute, for instance, in early 2019 constructed a small reservoir capable of storing 3,000 cubic metres of water for sanitary use and for irrigation of farm plots on its campus.
In past years, "we had constant conflicts with our neighbours living downstream as the floodwaters swept their homes and property", said the institution's principal, Patrick Muchemi.
But these days the school's water storage capacity has reduced that problem, and also cut erosion from flowing water on the campus' own land.
Fredrick Wamae, a neighbour of the school, said he now sleeps in peace during heavy downpours, confident the area won't flood.
"Most of my fears have now been eroded and every time we experience heavy downpours I get to relax," he said.
The school has almost halved its water costs by using its own harvested water for many purposes, though it still buys drinking water and top-up water from the local utility, Muchemi said.
Solar panels power the harvested water through a piping system, "saving the institution much in terms of cost", the principal said.
Farmer Terra Mathenge Nderitu stands near plants he grew using water harvested and stored in a small reservoir on his farm in in Nyeri County, Kenya, December 16, 2019. Thomson Reuters Foundation/Caroline Wambui
More reservoirs, fewer floods
Farmers in the area also have constructed small reservoirs to catch excess rain and hold it to irrigate crops through drought periods.
Terra Mathenge Nderitu, 70, of Nyeri County, even has rigged a system to direct water from his home's roof to a water pan he constructed.
"This has helped me avert any flooding at my farm while providing me with sufficient water during the dry season," he said.
Maina, of the Water Resources Management Authority, said the surge in water capture and storage efforts has played a significant role in curbing flooding, and is also helping recharge underground water stores.
"Most of the floodwater is not going into the rivers directly but is being retained in the recharge areas where it percolates into the rivers and streams slowly," he said.
Springs that once dried up are now lasting through the dry season, Maina said.
Other measures, from more terracing of steep farmland to efforts to plant cover crops to protect soil and better protect river edges, also are helping reduce flooding problems and soil loss, he said.
As a result of the changes, areas along the Tana River saw less flooding in 2019 than in previous heavy rain years, said Francis Koome, water resources coordinator for the Upper Tana Natural Resources Management Project.
Koome, an engineer, said both flooding threats and extreme water scarcity are falling in parts of the Upper Tana River catchment.