WASHINGTON — A Food and Drug Administration bill designed to increase inspections of foreign drug factories, while also speeding approvals of new drugs at home, is headed to the president’s desk after an overwhelming approval in the U.S. Senate.

The Senate approved the must-pass piece of the legislation by a vote of 92-4, and President Obama is expected to sign it into law within days.

The core of the bill is critical to the FDA: It bolsters the agency’s budget with billions of dollars in drug industry fees for scientists who review new medicines. For the first time, generic drugmakers will pay review fees to speed the approval of their products. Branded drugmakers have paid those fees for 20 years.

Lawmakers seized on the legislation to address recent concerns about the safety and quality of prescription medicines, especially those that are imported. The bill also gives the FDA new tools to fight counterfeiting and drug shortages, which have made headlines in the past year.

“This legislation will help bring critical drugs and medical devices to market faster, protect patients from drug shortages and manufacturing problems, and enhance the availability of low-cost generic drugs,” said Sens. Tom Harkin, D-Iowa, and Mike Enzi, R-Wyoming, who guided the bill through the Senate.

Public health experts say the most significant changes for consumers involve how FDA inspectors oversee foreign drug manufacturing facilities.

For more than 70 years, the agency has focused its inspections on U.S. factories. But most companies have moved their operations overseas to take advantage of cheaper labor and materials. Between 2001 and 2008 the number of U.S. drugs made outside of the country doubled, according FDA figures.

The bill passed by Congress would drop a requirement that FDA inspect all U.S. drug factories every two years and let it focus on foreign facilities, which it now typically inspects every nine years. The new bill requires that FDA inspectors target the most problematic manufacturing sites.