A flexible, generalized method of treatment allocation is proposed. The method uses a set of controlling parameters that enables the generic algorithm to produce a family of possible outcomes ranging from simple randomization to deterministic allocation. The method controls balance at stratum level, stratification level and overall without detriment to the predictability of the method. The paper lists the desirable characteristics of allocation methods and shows that the proposed method fulfils the majority and is easy to use in the clinical context, once the coding has been established. An explanation of the method for 2, 3 and 4 treatment group allocations is given. Simulations demonstrate the flexibility of the method. Copyright © 2011 John Wiley & Sons, Ltd.