Margaret Hamburg, commissioner of the U.S. Food and Drug Administration (FDA) (Shannon Stapleton/Reuters)

Margaret A. Hamburg, who as commissioner of the Food and Drug Administration for nearly six years oversaw far-reaching new initiatives on food safety and tobacco regulation and a wave of new drug approvals, plans to resign in March.

“The honest truth is that I had never expected to stay this long,” Hamburg said in an interview Thursday. “But the place got under my skin. It’s an extraordinary agency with amazing people and a unique and essential mission.”

Stephen Ostroff, the FDA’s chief scientist and a former official at the Centers for Disease Control and Prevention, will become the agency’s acting commissioner. Other top officials recently hired by Hamburg could potentially be nominated to succeed her, including Robert Califf, a well-known cardiologist and Duke University researcher who later this month will begin serving as deputy commissioner for medical products and tobacco.

Hamburg, 59, is among the longest-serving FDA commissioners in recent decades. A Harvard Medical School graduate and the daughter of physicians, she served as New York City’s health commissioner during the 1990s.

“There are few harder jobs in this town,” former FDA commissioner David Kessler said. “She’s pushed the ball uphill in a host of areas. . . . She’s been an excellent steward.”

But, like many of her predecessors, Hamburg also wound up embroiled in controversies, including ones over the sale of the morning-after pill to younger teenagers; a meningitis outbreak caused by unsanitary practices at a Massachusetts “compounding” pharmacy; and the agency’s approval of painkillers at the heart of the nation’s prescription drug epidemic.

“I’m pleased to see her go,” said Andrew Kolodny, president of Physicians for Responsible Opioid Prescribing and the head of an addiction treatment center in New York. Kolodny, who has often clashed with the FDA, said, “Her administration consistently put the interests of the drug companies ahead of public health.”

The reach of the sprawling agency, which regulates products accounting for about 20 cents of every dollar spent by American consumers, expanded during Hamburg’s tenure.

In 2009, Congress gave the FDA authority to regulate the tobacco industry. That effort has unfolded slowly, but the agency has begun putting in place new rules and has said it intends to regulate the booming market in electronic cigarettes.

In 2010, lawmakers directed the FDA to undertake the first major overhaul of the nation’s food-safety system in generations. To do so, Hamburg has had to balance a wide spectrum of interests, from small apple farmers to massive produce companies.

Hamburg also has overseen efforts to implement calorie-count labels on restaurant menus and the phaseout of harmful trans-fats. On the international front, she has dealt with the safety of drugs made in India and food imported from China.

Perhaps most significantly, the FDA in recent years has streamlined drug approvals. Last year alone, the agency approved 51 new drugs and biologics, many of them designated as “breakthrough” therapies for cancer and other conditions.

“When I came on board, FDA had been through a number of significant crises,” Hamburg said. “There was low morale and a sense that the agency really needed rejuvenation and redirection.”

In the years before she arrived, for example, the agency had failed to warn of the potential dangers of the anti-inflammatory drug Vioxx. And in 2005, the agency’s head, Lester Crawford, who had hidden ownership of stock in companies the agency was regulating, abruptly resigned.

Marion Nestle, a prominent nutrition expert and a public health professor at New York University who pushed hard for new food-safety measures, said Hamburg “managed to keep the agency funded, avoided scandals, and got [food safety], menu labels and food labels going. . . . Mostly, she kept Congress and the White House from tearing the agency apart.”

Hamburg said Thursday that no single factor triggered her departure, but she endured public battles and private frustrations during her years in the job.

In 2011, Kathleen Sebelius, then the secretary of health and human services, overruled the FDA and said the controversial contraceptive Plan B could not be sold over the counter to young teenagers. The Obama administration later allowed sales to women of all ages.

Hamburg encountered tough questions on Capitol Hill in 2012 after an unprecedented outbreak of fungal meningitis killed dozens of people who had received unsterile injections made at a compounding pharmacy in New England. Hamburg said at the time that the FDA needed broader authority over such operations.

The agency also faced criticism for monitoring the e-mails of some of its scientists who had expressed concerns that the FDA was approving medical devices they believed exposed patients to unacceptable risks.

The Pharmaceutical Research and Manufacturers of America, a top industry group, praised Hamburg for her “thoughtful regulation” and “strong leadership,” but others have said the agency is too close to the drug industry.

“Too often, the FDA has succumbed to industry and political pressures, implementing policies and taking actions that tilt too far toward the bottom-line interests of pharmaceutical and medical device companies,” Michael Carome, director of the health research group at Public Citizen, a nonprofit consumer advocacy organization, said in a statement.

Hamburg on Thursday recalled an old joke that the FDA has only two speeds of approving drugs: too fast or two slow. “My goal has always been to try to make sure that patients and consumers have products they need as rapidly as we can responsibly move them through the process, while always adhering to our standards for safety and efficacy,” she said.

Behind the scenes, Hamburg and other FDA officials often expressed frustration at the slow pace at which the Obama administration reviewed and revised proposed regulations on food safety, menu labels and tobacco products.

Her departure comes as lawmakers are working on bipartisan legislation aimed at streamlining the approval of drugs and devices even further, fueling concerns among some groups that safety could be sacrificed.

Hamburg has made it clear to numerous friends and colleagues that she has been weighing whether to leave for some time. “She just told me that it had been very intense and all-consuming and that she was ready to leave,” said one senior administration official, who spoke on the condition of anonymity because he wasn’t authorized to discuss personnel matters.

Hamburg said Thursday she hasn’t spent much time pondering what lies ahead.

“This is an intense, 24/7 job, where it’s very hard to step back and reflect on what it is that I might want to do next,” she said. “I just want to take a little time to reflect. And relax.”

Lena Sun contributed to this report.