Brain surgery is by no means a modern invention. Centuries ago, ancient healers and doctors practiced trepanation, or brain surgery that skipped the pain meds and scalpels (which did not exist yet) and instead relied on hand-operated drills and other tools to scrape away at the skull and tinker with its contents.

"When you get a knock on the head that causes your brain to swell dangerously, or you have some kind of neurological, spiritual or psychosomatic illness, drilling a hole in the head becomes a reasonable thing to do," lead author Danielle Kurin said in a statement.

The latest evidence for this practice emerged in the Peruvian Andes, where Kurin and her colleagues uncovered 1,000-year old skulls with striking signs of trepanation. Altogether, the team unearthed 32 skulls that exhibited evidence of 45 separate procedures (all of the skulls belonged to men - it was forbidden to perform the surgery on women and children, Kurin says). The practice first began to emerge in the region around 200-600 AD. Over the years, the researchers could see that the Peruvian doctors had evolved their procedures, sometimes using a drill, other times using a cutting or scraping tool. Doctors also sometimes practiced their technique on the dead, they say, much as medical students do today.

The practice continued for several hundred years because it was sometimes successful. Researchers can tell whether or not a patient survived based on bone patterns. If the hole had a pie crust-like pattern of divots, that means the skull had begun to grow back following the procedure. Bone, however, grows very slowly; some patients likely lived out the rest of their days with a large hole in their head, Kurin says.

The practice finally came to an end when the Spanish arrived in the 16th century and decided to make it illegal, she says. It would take another several centuries before the foundations for modern neurosurgery were laid.

More from Smithsonian.com:

Medical Instruments Spread Deadly Brain Disease to Surgery Patients

Are Modern Football Helmets Any Safer Than Old-School Leather Ones?