China’s sweeping campaign to cleanse filthy lakes and rivers has improved water quality in some regions — but dirty water still plagues parts of the country.

China began tightening environmental rules in 2001, in an effort to cut water pollution emitted by cities, industrial facilities and farms. Small-scale studies show that some Chinese lakes and rivers have since got cleaner.

To take a broader look, a team led by Ting Ma and Chenghu Zhou at the Chinese Academy of Sciences in Beijing studied three measures of water quality: levels of dissolved oxygen plus two proxies for the amounts of pollution in the water. All three had been measured monthly at China’s major inland rivers and lakes between 2003 and 2017.

Over that time, average pollution levels declined across the country, the researchers found. In northern China, levels dropped as cities and industry worked to clean up their discharges. But with urban populations exploding in the north, the environmental fight is not over.