In 2011, it rejected a different obesity drug that had been endorsed by the advisory committee.

Vivus shares, which did not trade during regular hours Wednesday, nearly doubled in after-hours trading to $21.05. Shares of Orexigen Therapeutics and Arena Pharmaceuticals, two other small companies trying again for approval again after their obesity drugs were rejected in the last two years, also rose after hours.

The F.D.A. has traditionally been cautious about diet pills because of previous safety issues, such as the heart valve damage caused by a component of the fen-phen combination. With a third of adult Americans obese and another third overweight, an obesity drug might be taken by millions of people, including many who just want to shed a few pounds.

The only prescription diet drug for long-term use is Roche’s Xenical, approved in 1999 but rarely prescribed because of limited effectiveness and embarrassing side effects.

That has led to pressure on the F.D.A. to take obesity more seriously. “Our members are telling us they are frustrated because there really aren’t enough tools in the toolbox,” Joseph Nadglowksi Jr., president of the Obesity Action Coalition, testified. The coalition represents obesity patients but also counts Vivus as a member.

The lopsidedness of the vote could not be predicted from the committee’s discussion during the daylong meeting in Silver Spring, Md., because many committee members seemed to be on the fence until the final tally.

Qnexa is a combination of two existing drugs — the stimulant phentermine, which was the surviving part of the fen-phen combination, and the epilepsy and migraine drug topiramate, also known by the brand name Topamax.

Use of Qnexa led to an average weight loss of around 10 percent of body weight after one year, though some weight was gained back in the second year. There also seemed to be positive effects on blood pressure and blood sugar, some blood lipids, and quality of life.