This study introduces an artificial immune system (AIS) based algorithm to solve the unequal area facility layout problem (FLP) with flexible bay structure (FBS). The proposed clonal selection algorithm (CSA) has a new encoding and a novel procedure to cope with dummy departments that are introduced to fill the empty space in the facility area. The algorithm showed consistent performance for the 25 test problem cases studied. The problems with 100 and 125 were studied with FBS first time in the literature. CSA provided four new best FBS solutions and reached to sixteen best-so-far FBS solutions. Further, the two very large size test problems were solved first time using FBS representation, and results significantly improved the previous best known solutions. The overall results state that CSA with FBS representation was successful in 95.65% of the test problems when compared with the best-so-far FBS results and 90.90% compared with the best known solutions that have not used FBS representation. (C) 2011 Elsevier Ltd. All rights reserved.