Purpose: The purpose of this work is to develop a framework to the inverse problem for radiosurgery treatment planning on the Gamma Knife® Perfexion™ (PFX) for intracranial targets. Methods: The approach taken in the present study consists of two parts. First, a hybrid grassfire and sphere-packing algorithm is used to obtain shot positions (isocenters) based on the geometry of the target to be treated. For the selected isocenters, a sector duration optimization (SDO) model is used to optimize the duration of radiation delivery from each collimator size from each individual source bank. The SDO model is solved using a projected gradient algorithm. This approach has been retrospectively tested on seven manually planned clinical cases (comprising 11 lesions) including acoustic neuromas and brain metastases. Results: In terms of conformity and organ-at-risk (OAR) sparing, the quality of plans achieved with the inverse planning approach were, on average, improved compared to the manually generated plans. The mean difference in conformity index between inverse and forward plans was -0.12 (range: -0.27 to 0.03) and 0.08 (range: 0.00-0.17) for classic and Paddick definitions, respectively, favoring the inverse plans. The mean difference in volume receiving the prescribed dose (V 100) between forward and inverse plans was 0.2 (range: -2.4 to 2.0). After plan renormalization for equivalent coverage (i.e., V 100), the mean difference in dose to 1 mm3 of brainstem between forward and inverse plans was -0.24 Gy (range: -2.40 to 2.02 Gy) favoring the inverse plans. Beam-on time varied with the number of isocenters but for the most optimal plans was on average 33 min longer than manual plans (range: -17 to 91 min) when normalized to a calibration dose rate of 3.5 Gymin. In terms of algorithm performance, the isocenter selection for all the presented plans was performed in less than 3 s, while the SDO was performed in an average of 215 min. Conclusions: PFX inverse planning can be performed using geometric isocenter selection and mathematical modeling and optimization techniques. The obtained treatment plans all meet or exceed clinical guidelines while displaying high conformity. © 2012 American Association of Physicists in Medicine.