A novel image-guided system for precise automatic targeting in minimally invasive keyhole neurosurgery. The system consists of a miniature robot fitted with a mechanical guide for needle, probe, or catheter insertion. Intraoperative, the robot is directly affixed to a head clamp or to the patient skull. It automatically positions itself with respect to predefined entry points and targets in a preoperative CT/MRI image following an anatomical registration with an intraoperative 3D surface scan of the patient facial features and a registration jig. The registration procedure is a novel three-way scheme, in which the intraoperative surface scan including the registration jig is matched to a model generated from the preoperative CT/MRI image, the robot position is known in relation to the registration jig, and the entry and target points are known from the preoperative CT/MRI image, such that the robot position can be related to the entry and target points.