Taking hydroxychloroquine shortly after being exposed to COVID-19 does not help prevent infection in a statistically meaningful way, scientists reported Wednesday following a clinical trial.

The medicine has been touted by US President Donald Trump, who has said he used it as a prophylaxis against the novel coronavirus.

But an experiment involving 821 people across the United States and Canada showed it did not work significantly better than a placebo for this purpose.

The study was led by a team at the University of Minnesota, and their paper was published in the New England Journal of Medicine.

Researchers enrolled adults who had come into contact with someone who had a confirmed case of COVID-19 for more than 10 minutes at a distance of six feet (about two meters) or less.

The majority of them -- 719 -- were deemed to have had "high-risk" exposure because they wore neither a face mask nor an eye shield at the time, while the rest were "moderate-risk" because they covered their face but did not have goggles.

All participants were randomly assigned to receive either hydroxychloroquine -- which is certified for use against malaria, rheumatoid arthritis and lupus -- or a placebo, within four days.

The researchers then looked at how many patients went on to develop COVID-19 over the next two weeks, which was confirmed either by a laboratory test or by clinical signs.

They found that 49 of the 414 given the medicine got the disease caused by the coronavirus, compared to 58 of the 407 on the placebo.

This translates to 11.83 percent on the drug were infected, versus 14.25 percent on the placebo.

The absolute difference of about 2.4 percentage points in favor of the medicine was not considered statistically significant given the sample size, meaning it could have occurred because of chance.

Side effects were more common with hydroxychloroquine than with the placebo -- 40.1 percent versus 16.8 percent -- but no serious adverse reactions were reported.

"This randomized trial did not demonstrate a significant benefit of hydroxychloroquine as postexposure prophylaxis for COVID-19," wrote the authors.

The results of the study were eagerly awaited because it was a randomized controlled trial (RCT), a carefully designed experiment that is considered the gold standard for investigating clinical outcomes.

Several previous studies on the drug that have made headlines were "observational," meaning they looked back at what had already happened. As such, more variables are left to chance and it is generally harder to draw firm conclusions.

Nevertheless, Martin Landray, a professor of medicine and epidemiology at the University of Oxford, said more research was needed to know for sure whether hydroxychloroquine might have a moderately positive effect.

"The study is too small to be definitive," said Landray, who was not involved in the trial.

The results "makes it very unlikely that there is a large effect (e.g. a halving in the risk of infection) but cannot rule out a more modest difference (e.g. a reduction of one-quarter or one-third) which would still be very valuable," he added.