A method is proposed for controlling the deposited power distribution in a layered cylindrical lossy model, irradiated by a phased-array hyperthermia system consisting of four waveguide applicators. A rigorous electromagnetic model of the heated tissue, which takes into account coupling phenomena between system elements, is used for predicting the electric field at any point inside tissue. The relative amplitudes and relative phases of the array elements are optimized in order to attain desired specific absorption rate (SAR) distributions inside and outside malignant tissues. A constrained nonlinear optimization problem is solved by using the penalty function method and the resulting unconstrained minimization of the penalty function is carried out by the downhill simplex method. Two practical phased-array hyperthermia systems have been studied and numerical results are presented.