The U.S. House and Senate have passed a bill Senator Tom Harkin helped guide through congress, giving the U.S. Food and Drug Administration authority to regulate so-called compounding pharmacies. “They’ll be subject to FDA oversight in much the same way as traditional drug manufacturers are today,” Harkin says. “FDA will know who these outsourcers are and what they are making.”

A meningitis outbreak that killed at least 64 and sickened over 700 last year was traced to a compounding pharmacy in Massachusetts that mixed a steroid medication and sent the drug to clinics and hospitals in 23 different states. Compounding pharmacies traditionally mixed injectable drugs, creams and other medications for individual patients with a prescription, but the demand for certain medications has led to mass production at some compounding pharmacies — which have been regulated by the states. “We found out it was sort of a confusing mess for everybody about who was responsible and who wasn’t,” Harkin says.

Harkin calls the bill a rare triumph of bipartisan cooperation in congress. “This is a bill that many might say is long overdue, but better late than never,” Harkin says. “I’m sorry it took a terrible calamity like the outbreak of meningitis to really focus on this and move it, but it did.”

The bill gives the Food and Drug Administration authority to inspect pharmacies that mix drug compounds and ship them across state lines. Small pharmacies that mix drugs for an individual with a prescription will still be regulated by states. More than 14,000 patients got injections from the three contaminated batches of steroids mixed at the compounding pharmacy in Massachusetts that was shut down after last year’s meningitis outbreak.

The bill cleared the Senate Monday and is on its way to the president’s desk for his review.