The F.D.A. declares that “Americans can be confident in the quality of the products the F.D.A. approves.” Because of that reassurance, even savvy consumers — the sorts of people who are well versed in the quality distinctions between Velveeta and artisanal Cheddar — don’t think about how and where their drugs are made when they head to a pharmacy. Their only question usually is: Can they afford, or will their insurance cover, the drug being dispensed?

The F.D.A., which approved more than 1,000 new generic drug products last year, faces a vast challenge in safeguarding these medications. Nearly forty percent of all our generic drugs are made in India. Eighty percent of active ingredients for both our brand and generic drugs come from abroad, the majority from India and China. America makes almost none of its own antibiotics anymore.

Of course, overseas manufacturing can work perfectly well and the F.D.A. contends that it has a reliable review system for all approved drugs. “The F.D.A. inspects all brand-name and generic manufacturing facilities around the world which manufacture product for the U.S. market to confirm they meet F.D.A.'s requirements for manufacturing process,” it said recently.

My reporting on the generic drug industry over the last decade led me to four continents, and into the overseas plants where America’s generic drugs are made. Interviews with more than 240 people, including numerous whistle-blowers, helped expose what was going on behind the boardroom doors at generic-drug companies. Some companies have encouraged data fraud as the most profitable path to securing approvals from regulators, and have used deceit to hold the F.D.A.’s investigators at bay.

In the United States, F.D.A. investigators typically show up unannounced to inspect plants. But overseas, the F.D.A. has opted to announce the vast majority of its foreign inspections in advance. Overseas plants even “invite” the F.D.A. to inspect; the investigators then become the company’s guests and agree on an inspection date in advance. Plant officials have served as hosts and helped to arrange local travel.

The F.D.A. has defended this system as the best way to ease the complex logistics of getting visas and ensuring access to the plants. But the resulting inspections are largely “staged,” say a number of F.D.A. staff members. With advance notice and low-cost labor, the plants can make anything look like anything. “You give them a weekend, they’ll put up a building,” as one F.D.A. investigator put it.

Mr. Baker, the young inspector, pulled back the curtain on these staged visits. He rejected guided tours. Instead, he would arrive at a plant and head to the quality control laboratory, where employees typically audit test results coming in from the factory floor. There, he would get into the computer system and sift through the data himself.