It was at a midday briefing last month that President Donald Trump first promoted two anti-malaria drugs in the fight against the coronavirus.

“I think it could be something really incredible,” Trump said March 19, noting that while more study was needed, the two drugs had shown “very, very encouraging results” in treating the virus.

By that evening, first-time prescriptions of the drugs — chloroquine and hydroxychloroquine — poured into retail pharmacies at more than 45 times the rate of the average weekday, according to an analysis of prescription data by the New York Times. And the nearly 32,000 prescriptions came from across the spectrum — rheumatologists, cardiologists, dermatologists, psychiatrists and even podiatrists, the data show.

While medical experts have since stepped up warnings about the drugs’ possible dangerous side effects, they were still being prescribed at more than six times the normal rate during the second week of April, the analysis shows. All the while, Trump continued to extol their use. “It’s having some very good results, I’ll tell you,” he said in a White House briefing April 13.

The extraordinary change in prescribing patterns reflects, at least in part, the outsized reach of the Trump megaphone, even when his pronouncements distort scientific evidence or run counter to the recommendations of his own experts. It also offers the clearest evidence yet of the perils of a president willing to push unproven and potentially dangerous remedies to a desperate public.

On Friday, the FDA warned against using the drugs outside a hospital setting or clinical trial because they could lead to serious heart rhythm problems in some coronavirus patients. Days earlier, the federal agency led by Dr. Anthony Fauci — one of Trump’s top advisers on the pandemic — issued cautionary advice on the drugs and stated that there was no proven medication to treat the virus.

As the prescriptions surged in the second half of March, the largest volumes per capita included states hit hardest by the coronavirus, like New York and New Jersey. Georgia, Arkansas and Kentucky were other states with relatively high per-capita figures.

More than 40,000 health care professionals were first-time prescribers of the drugs in March, according to the data, which is anonymized and based on insurance claims filed for about 300 million patients in the United States, representing approximately 90% of the country’s population. The data is current through April 14.

The data was compiled by IPM.ai, a subsidiary of Swoop, a company in Cambridge, Mass., that specializes in health care data and analytics based on artificial intelligence. It does not include drugs prescribed to patients in hospitals, where some doctors have administered the medication, or those released to hospitals from the Strategic National Stockpile.

After Trump’s remarks last month, retail pharmacies across the country reported a run on the drugs, which are mostly prescribed by a small subset of medical specialists. Within days, states began issuing emergency orders to restrict the new prescriptions.

Although the availability of hydroxychloroquine has improved in recent weeks, the FDA still lists it as being in short supply.

Mike Donnelly, vice president of communications for the Lupus Foundation of America, said that the organization received calls and e-mails daily from patients told their prescription could be filled only in part or not at all. A spokesman for the Arthritis Foundation said some patients received their refills only after calling around to as many as a dozen pharmacies.

In the past month, about 40 states have intervened in some manner to quell the frenzy.

Idaho was the first to take a hard line, issuing a temporary rule on the same day that Trump first mentioned the drugs in his daily briefing. The rule banned pharmacists from dispensing chloroquine and hydroxychloroquine unless the prescription included a written diagnosis of a condition that the drugs had been proved to treat. The rule also limited prescriptions to a 14-day supply unless a patient had previously taken the medication.

The director of Idaho’s State Board of Pharmacy said at the time that many of the prescriptions were being written by doctors for themselves and their family members, a trend reported by other state boards as well.

Some of those writing prescriptions for themselves may have been on the front lines treating patients; the data shows an uptick among health care practitioners working in emergency medicine. More broadly, the analysis indicates a major shift in the kinds of medical practitioners writing the prescriptions, based on patterns in retail pharmacies since 2016.

Historically, the majority of chloroquine and hydroxychloroquine prescriptions have come out of a narrow band of specialties like rheumatology. That changed last month, when the specialties reflected in the data included larger numbers of those working in dermatology, ophthalmology, podiatry, urology and other areas.

The interest in taking chloroquine and hydroxychloroquine as a possible treatment did not originate with Trump.

Reports from doctors in China and France that the drugs might help patients fueled interest in scientific and medical communities here. Conservative media, in particular, trumpeted the drugs’ potential effectiveness, and the data shows prescriptions had already increased 2½ times over the weekday average during the week before Trump’s March 19 briefing.

In a March 21 tweet, Trump extended his interest to a combination of one of those drugs, hydroxychloroquine, with an antibiotic, azithromycin.

The tweet coincided with a weekend flood of prescriptions for the two anti-malaria drugs. By the end of the day, the prescriptions had increased 114 times at retail pharmacies compared with the average weekend day, according to the Times analysis.

On Tuesday, the National Institute of Allergy and Infectious Diseases, led by Fauci, issued guidelines against the combination of hydroxychloroquine and azithromycin except in clinical trials, with experts citing the potential for toxicities.

Enthusiasm for the drugs has been waning, including at Trump’s own news conferences and among researchers.

By Thursday, Trump had moved on to a different subject — the use of disinfectants to kill the coronavirus inside the body. Dire warnings followed from state health officials who were inundated with requests for information about such a course of action. Trump later insisted he had only been kidding.