This article reports a transition-based control technique to prevent deadlocks for flexible manufacturing systems that can be modeled with a generalized class of Petri nets. The proposed method utilizes the structural properties of the Petri net model to avoid the computation of its reachability graph which in general leads to the state explosion problem. Three algorithms are developed. The first and second algorithms aim to compute first-met and n-met uncontrolled transitions, respectively, in an iterative manner until all the n-met uncontrolled transitions are found in the plant net model. The third algorithm is used to design n-transition controllers iteratively. The iteration terminates when all the transitions in the set of uncontrolled transitions are processed. The addition of the n-transition controllers to the plant net model is to make the n-met uncontrolled transitions controlled. The transition controllers are capable of enforcing liveness to the plant net model with all its reachable markings being retained in the controlled system, which ensures the full utilization of resources and provides the high productivity of a flexible manufacturing system.