The intensity modulated radiation therapy (IMRT) treatment planning problem consists of several subproblems which are typically solved sequentially. We seek to combine two of the subproblems: the beam orientation optimization (BOO) problem and the fluence map optimization (FMO) problem. The BOO problem is the problem of selecting the beam orientations to deliver radiation to the patient. The FMO problem is the problem of determining the amount of radiation intensity, or fluence, of each beamlet in each beam. The solution to the FMO problem measures the quality of a beam set, but the majority of previous BOO studies rely on heuristics and approximations to gauge the quality of the beam set. In contrast with these studies, we use an exact measure of the treatment plan quality attainable using a given beam set, which ensures convergence to a global optimum in the case of our simulated annealing algorithm and a local optimum in the case of our local search algorithm. We have also developed a new neighborhood structure that allows for faster convergence using our simulated annealing and local search algorithms, thus reducing the amount of time required to obtain a good solution. Finally, we show empirically that we can generate clinically acceptable treatment plans that require fewer beams than in current practice. This may reduce the length of treatment time, which is an important clinical consideration in IMRT. © 2008 Springer Science+Business Media, LLC.