In external radiotherapy, the use of intensity modulated fields has been proposed for tissue and non-homogeneity compensation or for the generation of conformal dose distributions. Multileaf collimators can be employed dynamically for the modulation of the X-ray field in two dimensions. Efficient dynamic collimation became possible due to advances in computer and linear accelerator technology. It presents a number of advantages over conventional methods such as the use of compensators. We have developed a program which calculates, from a given intensity distribution, the motion of the MLC leaves as a function of monitor units, and we have applied it on a Varian linear accelerator with a 40 pair multileaf collimator. The analysis of the experimental results demonstrates the feasibility and the potential of the method.