The development and implementation of an agent-based distributed control system in a wastewater treatment plant (WWTP) are shown. The hardware architecture contains different supervision levels, including two autonomous process computers, a programmable logic controller (PLC) and a knowledge-based system (KBS), acting at the top supervisory level. The knowledge is organized in several distributed agents, representing the available knowledge for every subprocess of the WWTP. In addition to these independent agents, a supervisor agent acts as its master. The distributed multi-agent architecture improves previous developments with monolithic KBS, allowing the development of independent and reusable agents. Different strategies have been included, adapted, and modified without a great programming effort. The developed system has involved the transformation of a classical control system into a system that enables a WWTP to respond to different usual problems. Finally, the system has been satisfactorily validated supervising a pilot WWTP for more than 3 years.