The paper proposes a new framework to learn a Fuzzy Logic Controller (FLC), from data extracted from a process while it is being manually controlled, in order to control nonlinear industrial processes. The learning of the FLC is performed by a hierarchical genetic algorithm (HGA). First, the fuzzy c-means (FCM) clustering algorithm is applied to initialize the HGA population, in order to reduce the computational cost and increase the performance of the HGA. The HGA is composed by five hierarchical levels and it is an automatic tool since it does not require any prior knowledge concerning the structure (e.g. the number of rules) and the database (e.g. antecedent and consequent fuzzy sets) of the FLC, and concerning the selection of the adequate input variables and their respective time delays. After the extraction of the FLC by the proposed method, in order to obtain a better control results, if necessary, the learned FLC can be improved manually by using the information transmitted by a human operator, and/or the learned FLC could be easily applied to initialize the required fuzzy knowledge-base of adaptive controllers. In order to improve the results of the learned FLC, a direct adaptive fuzzy controller is applied. Moreover, the proposed method is applied on control of the dissolved oxygen in an activated sludge reactor within a simulated wastewater treatment plant. The results are presented, showing that the proposed method successfully extracted the parameters of the FLC.