“Unlike expensive new cancer drugs that extend survival by three-to-six months, antibiotics like ours truly save a patient’s life,” said Larry Edwards, chief executive of the company that makes Xerava, Tetraphase Pharmaceuticals. “It’s frustrating.”

Tetraphase, based in Watertown, Mass., has struggled to get hospitals to embrace Xerava, which took more than a decade to discover and bring to market, even though the drug can vanquish resistant germs like MRSA and CRE, a group of resistant bacteria that kills 13,000 people a year.

Tetraphase’s stock price has been hovering around $2, down from nearly $40 a year ago. To trim costs, Mr. Edwards recently shuttered the company’s labs, laid off some 40 scientists and scuttled plans to move forward on three other promising antibiotics.

For Melinta Therapeutics based in Morristown, N.J., the future is even grimmer. Last month, the company’s stock price dropped 45 percent after executives issued a warning about the company’s long-term prospects. Melinta makes four antibiotics, including Baxdela, which recently received F.D.A. approval to treat the kind of drug-resistant pneumonia that often kills hospitalized patients. Jennifer Sanfilippo, Melinta’s interim chief executive, said she was hoping a sale or merger would buy the company more time to raise awareness about the antibiotics’ value among hospital pharmacists and increase sales.

“These drugs are my babies, and they are so urgently needed,” she said.

Coming up with new compounds is no easy feat. Only two new classes of antibiotics have been introduced in the last 20 years — most new drugs are variations on existing ones — and the diminishing financial returns have driven most companies from the market. In the 1980s, there were 18 major pharmaceutical companies developing new antibiotics; today there are three.

“The science is hard, really hard,” said Dr. David Shlaes, a former vice president at Wyeth Pharmaceuticals and a board member of the Global Antibiotic Research and Development Partnership, a nonprofit advocacy organization. “And reducing the number of people who work on it by abandoning antibiotic R & D is not going to get us anywhere.”

A new antibiotic can cost $2.6 billion to develop, he said, and the biggest part of that cost is the failures along the way.