There is provided a patient specific stereotactic template for use in surgery, particularly minimally invasive spinal surgery. The lower surface of the template is shaped to match an outer surface of a patients anatomy, such as the skin, and a trajectory guide receives an instrument for percutaneous introduction into the patients body. There is also provided a method of performing surgery using the template.