A migraine drug can help stop the devastating headaches in their tracks, allowing sufferers to go about their daily lives with little to no symptoms, a new clinical trial has found, HealthDay News reports.

People who took ubrogepant (Ubrelvy) were 73% more likely to say they had no disability and were able to function normally within a couple of hours, compared to those who took a placebo, researchers reported in the journal Neurology.

The clinical trial, funded by the drug’s maker AbbVie, involved 518 patients who’d been suffering two to eight migraine attacks a month.

All of the participants regularly experienced signs that a migraine would be starting within the next few hours, such as sensitivity to light and sound, fatigue, neck pain or stiffness, dizziness or a visual aura, researchers said.

Participants were randomly provided either a placebo pill or a 100-milligram ubrogepant tablet, and told to take them when they felt their next migraine coming.

The participants then were given either placebo or ubrogepant—whichever they didn’t get during the first round—and asked to take the pill prior to the next migraine attack.

About 24 hours after taking the pill, 65% of those who took ubrogepant reported that they had little to no migraine symptoms, compared to 48% of those who took a placebo.