Functional magnetic resonance imaging (fMRI) is used to distinguish areas of the brain responsible for different tasks and functions. It is possible, for example, by using fMRI images, to identify particular regions in the brain which can be considered as "functional organs at risk" (fOARs), i.e., regions which would cause significant patient morbidity if compromised. The aim of this study is to propose and validate a method to exploit functional information for the identification of fOARs in CyberKnife (Accuray, Inc., Sunnyvale, CA) radiosurgery treatment planning; in particular, given the high spatial accuracy offered by the CyberKnife system, local nonrigid registration is used to reach accurate image matching. Five patients affected by arteriovenous malformations (AVMs) and scheduled to undergo radiosurgery were scanned prior to treatment using computed tomography (CT), three-dimensional (3D) rotational angiography (3DRA), T2 weighted and blood oxygenation level dependent echo planar imaging MRI. Tasks were chosen on the basis of lesion location by considering those areas which could be potentially close to treatment targets. Functional data were superimposed on 3DRA and CT used for treatment planning. The procedure for the localization of fMRI areas was validated by direct cortical stimulation on 38 AVM and tumor patients undergoing conventional surgery. Treatment plans studied with and without considering fOARs were significantly different, in particular with respect to both maximum dose and dose volume histograms; consideration of the fOARs allowed quality indices of treatment plans to remain almost constant or to improve in four out of five cases compared to plans with no consideration of fOARs. In conclusion, the presented method provides an accurate tool for the integration of functional information into AVM radiosurgery, which might help to minimize undesirable side effects and to make radiosurgery less invasive.