In cancer surgery, the difference between recovery and relapse can be just a few millimeters. After solid tumors are removed, cancer surgeons and pathologists need to make critical decisions about how much marginal tissue to excise from the patient’s body and how much to leave. They know that leaving just a few cancer cells behind is strongly associated with recurrence. But in particularly sensitive cases like brain cancer, removing too much healthy tissue can result in paralysis or worse.

The current method for distinguishing between cancerous and benign tissue during surgery is to cut out and freeze small samples to be analyzed by pathologists. But the process still takes 30 minutes at its fastest, and an accurate diagnosis depends largely on the morphology or physical characteristics of the cells, which can be damaged in the freezing process.

In an effort to greatly improve the speed and accuracy of tissue analysis, a team of researchers from the University of Texas at Austin created the MasSpec Pen, a handheld probe that can deliver a diagnosis in 10 to 15 seconds with 96 percent accuracy. Their work is detailed in a recent paper published in the journal Science Translational Medicine.

The pen itself is a very simple device. Principal investigator Livia Eberlin, a chemistry professor at the University of Texas at Austin, explained that it’s designed to gently extract small molecules from the surface of living tissue using nothing but a suspended droplet of water. The surgeon holds the tip of the pen against the target tissue for three seconds, then the water droplet is sucked through a long plastic tube directly into a mass spectrometer.

Inside the mass spectrometer, the water sample is analyzed for a host of molecules including amino acids, glutamine, glutamate, abscorbic acid, lipids, proteins, and fatty acids. Eberlin and her team analyzed hundreds of tissue samples from patients with lung, breast, thyroid, and ovarian cancers to create a database of molecular profiles.

“Now we knew the molecular profiles that are associated with cancer and the molecular profiles associated with normal tissue,” Eberlin told Seeker. “We used statistical algorithms to develop a classification system that can automatically look through the profiles and say, this is looking like cancer with this probability, or this is healthy.”

The MasSpec Pen isn’t the first handheld device to attempt to quickly and accurately detect the presence of cancer cells. The iKnife, developed in 2013 by researchers at University College London, is an electrosurgical scalpel that cauterizes tissue as it cuts. While such scalpels have existed for decades, the iKnife’s innovation was to analyze the smoke created by the singed tissues to determine if they were cancerous.

Other surgical probes rely on infrared or ultraviolet lasers to “ablate” or vaporize the surface of tissues to analyze their molecular profile.

That’s where the MasSpec Pen stands out, according to Eberlin. It’s the first handheld diagnostic device that causes absolutely no damage to the target tissue, even at a microscopic level. Unlike with the iKnife or laser devices, surgeons can safely test marginal tissue without potentially harming healthy cells.

The MasSpec Pen hasn’t been tried yet in human surgeries. Eberlin and the study’s lead author Jialing Zhang, a research associate at UT Austin, used the pen to test more than 250 ex-vivo human tissue samples and even tried it surgically on mice with breast cancer.

“The overall accuracy for all four cancers — lung, breast, thyroid, and ovarian — is 96 percent,” said Zhang. “That’s pretty exciting both for us and our collaborators at Baylor University and the MD Anderson Cancer Center.”

The next step is to beef up the database of molecular profiles with many more samples of cancer tissue beyond the four varieties that Eberlin and her team studied initially, including types like brain cancer and melanoma. The more samples there are in the database, the researchers said, the more accurate and effective the MasSpec Pen will ultimately be when it’s finally in the hands of surgeons.

WATCH: How to Destroy Cancer Using Your Own Genetically Modified Cells