A process for producing polyhydroxyalkanoate, comprising the following steps: a) supplying a stream of wastewater comprising Readily Biodegradable COD (RBCOD) to a first reactor containing activated sludge comprising micro-organisms capable of accumulating PHA and subjecting the sludge in the first reactor to PHA-accumulating reaction conditions during a first period of time from 0.25 to 5 h, the conditions comprising the presence of dissolved oxygen and the presence of at least 10 mg/l readily biodegradable COD in the mixture, to obtain activated sludge comprising PHA at a level of at least 30 wt.% based on the dry weight of the sludge; b) transferring part of the activated sludge comprising PHA from the first reactor to a second reactor and retaining part of the activated sludge comprising PHA in the first reactor; c) supplying a stream of wastewater comprising RBCOD to the first reactor containing part of the activated sludge comprising PHA-and subjecting the sludge to PHA-accumulating conditions during a second period of time from 2 to 24 h, the PHA-accumulating conditions comprising the presence of dissolved oxygen and the presence of at least 10 mg/l readily biodegradable COD, to obtain activated sludge that is further enriched in PHA to a level of at least 60 wt.% based on the dry weight of the sludge, and treated wastewater; d) withdrawing the activated sludge that is further enriched in PHA from the first reactor as a product stream; e) subjecting the activated sludge comprising PHA in the second reactor in a liquid reaction medium to famine reaction conditions during a third period of time of between 2 and 24 h, the famine reaction conditions comprising the presence of dissolved oxygen, to obtain activated sludge enriched in micro-organisms capable of accumulating PHA; and f) transferring the activated sludge enriched in micro-organisms capable of accumulating PHA obtained in step e) to the first reactor to form the activated sludge comprising micro-organisms capable of accumulating PHA in step a). a) supplying a stream of wastewater comprising Readily Biodegradable COD (RBCOD) to a first reactor containing activated sludge comprising micro-organisms capable of accumulating PHA and subjecting the sludge in the first reactor to PHA-accumulating reaction conditions during a first period of time from 0.25 to 5 h, the conditions comprising the presence of dissolved oxygen and the presence of at least 10 mg/l readily biodegradable COD in the mixture, to obtain activated sludge comprising PHA at a level of at least 30 wt.% based on the dry weight of the sludge; b) transferring part of the activated sludge comprising PHA from the first reactor to a second reactor and retaining part of the activated sludge comprising PHA in the first reactor; c) supplying a stream of wastewater comprising RBCOD to the first reactor containing part of the activated sludge comprising PHA-and subjecting the sludge to PHA-accumulating conditions during a second period of time from 2 to 24 h, the PHA-accumulating conditions comprising the presence of dissolved oxygen and the presence of at least 10 mg/l readily biodegradable COD, to obtain activated sludge that is further enriched in PHA to a level of at least 60 wt.% based on the dry weight of the sludge, and treated wastewater; d) withdrawing the activated sludge that is further enriched in PHA from the first reactor as a product stream; e) subjecting the activated sludge comprising PHA in the second reactor in a liquid reaction medium to famine reaction conditions during a third period of time of between 2 and 24 h, the famine reaction conditions comprising the presence of dissolved oxygen, to obtain activated sludge enriched in micro-organisms capable of accumulating PHA; and f) transferring the activated sludge enriched in micro-organisms capable of accumulating PHA obtained in step e) to the first reactor to form the activated sludge comprising micro-organisms capable of accumulating PHA in step a).