A new class of migraine medication could make a "big difference" for those in desperate need of relief.

The drug ubrogepant has not yet been approved by the United States Food and Drug Administration, but a large-scale clinical trial suggests this oral pill might work safely where other treatments do not.

Within two hours of being taken, researchers found ubrogepant could stop a severe migraine in its tracks, performing significantly better than a placebo and with fewer risks than other drugs.

"Having ubrogepant as a potential new medication for the acute treatment of migraine will provide much-needed innovation for a disease that causes lost time for millions of people," says neurologist Richard Lipton, a consultant for Allergan, the pharmaceutical company sponsoring the trial.

A debilitating migraine is more than just a bad headache, and it's much harder for physicians to treat. In the US, more than 38 million people suffer from this neurological disease, and surveys show less than a third are satisfied with their care.

When it comes to effective and safe treatment, each patient is a little different, and in some of the more severe cases, options are limited and can even make things worse.

Since the 1990s, triptans have remained the most popular class of migraine medication for cases where over-the-counter meds simply don't work.

But while triptans might help reduce pain and inflammation, they also constrict the body's blood vessels. As a result, these drugs are not safe for people with high risks of heart disease or stroke, and still others don't respond to them at all.

Even so, there haven't been any new treatments for acute migraines in a long time. In fact, the FDA only recently approved a novel class of medication, called gepants, which can help stop severe headaches before they even get started.

Unlike triptans, which target serotonin in the brain, gepants target a molecule called calcitonin gene-related peptide (CGRP) that has a known role in migraines.

So far, only three CGRP inhibitors have been approved by the FDA and all of these are injections. If ubrogepant is deemed safe and effective enough, it will be one of the first oral gepants that can prevent acute migraines.

In a Phase 3 clinical trial, which was randomised, double-blind, and placebo-controlled, researchers tested out two different doses of ubrogepant on 1,686 patients, all of whom reported migraines between 2 and 8 times a month.

Participants were either given a tablet of ubrogepant containing 50 mg, 25 mg, or a placebo. During the trial, they were instructed to take one tablet as soon as possible, or within 4 hours of a moderate or severe migraine coming on.

If that initial dose wasn't enough to stop the pain, a second dose was allowed, and this was randomised so that the patient either received a placebo or a repeat dose of ubrogepant. 'Rescue medication', like acetaminophen, NSAIDs, opioids, antiemetics, or triptans, was only used in cases where both doses did not work.

Of all those who took the lower and higher dose of ubrogepant, over 20 percent were free of pain within two hours. In comparison, the placebo relieved only 14 percent.

Getting rid of the most bothersome symptoms was a bit harder and required a higher dose of ubrogepant. In this case, only those taking 50 mg were significantly better off than those taking the placebo.

"The current results indicate that 50 mg of ubrogepant has the potential to address key treatment goals in the acute treatment of migraine," Lipton and his colleagues write.

"Ubrogepant's mechanism of action may make it an option for people who do not respond to currently available medications."

It's an effective drug, but it's not as impressive as other medication already on the market. Previous research, for instance, has shown that within an hour, triptans can show safe and effective response rates in up to 70 percent of patients.

Neurologist Stephen Silberstein who was not involved in the study told CNN that while ubrogepants might be useful for those who can't tolerate triptans, they aren't better and they aren't a magic cure-all.

Instead, it's better to consider ubrogepant as a promising new mode of treatment for those patients who have slipped through the cracks.

"For the first time in a long time we've gone from no news to lots of good news," Silberstein wrote in a recent review of the research.

"We've gone to these new medicines for the acute treatment of migraine, and we have new medicines for the prevention of migraine."

Further research will be needed to evaluate the long-term safety of these drugs, but according to Lipton, FDA approval could come as early as next month.

This study was published in JAMA.

Editor's note (22 November 2019): An earlier version of this article incorrectly stated that gepants use monoclonal antibodies. This error has now been corrected.