TRAVERSE CITY, Mich. -- Despite recent improvements, the U.S. and Canada have a long way to go toward ridding the Great Lakes of pollution that endangers human health and the environment, an advisory agency said Tuesday.

Inadequately treated sewage, industrial chemicals and farm runoff are still flowing into the five lakes that provide drinking water for about 40 million people, the International Joint Commission said in its first checkup report since both nations last updated the Great Lakes Water Quality Agreement in 2012.

The report calls for improving drinking water and sewage treatment facilities, and strengthening clean-water regulations, particularly limits on phosphorus runoff that is largely responsible for explosive growth of harmful algae in Lake Erie. Agencies also should work faster to identify newer types of contamination, such as fire retardant chemicals, and develop strategies for limiting them, the report says.

"While significant progress has been made to restore and protect the lakes, the governments of Canada and the United States and Great Lakes civil society as a whole are living with the costly consequences of past failures to anticipate and prevent environmental problems," the report says. "By now, it should be clear that prevention makes environmental, economic and common sense."

The two countries negotiated the first version of the water quality agreement in 1972 following a century of abuse that left portions of the lakes in deplorable condition. It focuses primarily on toxic pollution, invasive species and nutrient runoff but has been revised several times to include other threats, including climate change.

In the 45 years since the initial pact was signed, a number of highly contaminated "hot spots" in harbours and tributary rivers have been cleaned up and steps have been taken to reduce chemical and phosphorus discharges from industry and city wastewater treatment plants.

Yet too little has been done to make the lakes safe for drinking, swimming and fishing -- the uses that most directly affect human health, the report says. Even as the Trump administration and many state and local governments seek to cut spending, the report recommends big increases to improve water infrastructure. It notes that a number of cities have dealt with unsafe drinking water incidents and many native tribal communities have longstanding boil-water advisories.

"Our municipalities must not be permitted to dump sewage into our drinking water and we call for a 'zero discharge' objective, which will bring to an end the all-too-frequent beach closings," said Gordon Walker, the Canadian co-chairman of the international commission.

Lake Erie, which has the Great Lakes' largest fish population, draws special attention in the report because of a worsening toxic algae plague. While the U.S. and Canada have set targets for reducing nutrient runoff that feeds algae, they lack enforceable deadlines and standards for applying fertilizer and manure on croplands.

"Voluntary measures have failed to protect Lake Erie from extreme algae blooms," said Lana Pollack, the commission's U.S. co-chairwoman.

Steps toward dealing with flame retardants and other emerging toxins have been "disappointingly slow," the report said. Only eight such chemicals have been identified and no U.S.-Canadian plan has been devised for halting their release into the lakes.