“I was horrified,” said Dr. Tadataka Yamada, who worked at GlaxoSmithKline . “In those days, they went from being one of the most respected industries in the world to one ranked just above tobacco companies.”

Dr. Yamada eventually became one of the central figures in the industry’s transformation. He served as president of global health at the Bill and Melinda Gates Foundation, and then as chief medical officer for Takeda, helping it rise in the Access to Medicine rankings.

There were other important inflection points, experts said .

One was the about-face by the Clinton administration in 1999. After Vice President Al Gore was pressured by AIDS activists during his presidential campaign, the administration decided to support South Africa’s efforts.

Another turning point came in 2001, when Cipla, an Indian company, offered H.I.V. drugs to Doctors Without Borders for $350 per patient per year.

The offer revealed the huge markups the brand-name drug makers had been profiting from, and introduced the Indian pharmaceutical industry as a rival.

“Cipla was a driver for change,” said David Reddy, chief executive of the Medicines for Malaria Venture, one of many public-private partnerships created to guide industry research.

The George W. Bush administration founded or supported the agencies that became the biggest buyers of generics: the President’s Emergency Plan for AIDS Relief; the President’s Malaria Initiative; and the Global Fund to Fight AIDS, Tuberculosis and Malaria.