1. A method of treating a moving target in a patient by applying to said target one or more radiosurgical beams generated from a radiosurgical beam source, the method comprising the steps of: A. generating a pre-operative 3D scan of said target and of a surrounding region, said 3D scan indicating the position of said target relative to said surrounding region; B. based on said 3D scan, generating a treatment plan defining a plurality of radiosurgical beams appropriate for creating at least one radiosurgical lesion on said target; C. in near real time, detecting the motion of said target to determine the position of said target at a current time, and generating one or more signals representative of said motion of said target; D. in near real time, determining the difference in the position of said target at said current time, as compared to the position of said target as indicated in said CT scan; E. in near real time, adjusting the relative position of said radiosurgical beam source and said target in order to accommodate for said difference determined in step D, and applying x-rays to said target from said adjusted position of said radiosurgical beam source.