Shares of struggling OvaScience have dipped 8 percent this morning after the company announced it entered into an all-stock reverse merger agreement with privately-held Millendo Therapeutics, Inc.of Ann Arbor, Mich.

The merger agreement is an attempt to save a company that once was worth more than $1 billion. The wheels began coming off the company two years ago. In December 2016, the company’s chief executive officer resigned and about 30 percent of employees were let go as the company struggled to sell its fertility treatment products in the United States. Then in June of last year, OvaScience slashed about 50 percent of its remaining employees as part of a restructuring plan. In January of this year, it happened again. OvaScience again cut 50 percent of its staff as part of yet another restructuring.

Now the beleaguered company will fall under the umbrella of Millendo. The merged company will operate under the name of Millendo Therapeutics and trade under the Nasdaq ticker symbol MLND. The new Millendo will focus on the advancement of Millendo’s pipeline of transformative treatments for orphan endocrine diseases.

Christopher Kroeger, OvaScience’s chief executive officer, said the decision to become part of Millendo was made following an “extensive and thorough review of strategic alternatives” for the company. He said the deal is the best path forward and has the potential to deliver “significant and immediate value” to company shareholders.

“We are certain that the strength and dedication of the Millendo leadership team provides our combined company with the capabilities to develop new and much-needed therapies for patients with orphan endocrine diseases,” Kroeger said.

As the two companies merge, a group of investors that includes New Enterprise Associates, Frazier Healthcare Partners, Roche Venture Fund and more, provided the two merged companies a $30 million infusion. The financing will fund the development of Millendo’s lead assets, livoletide (AZP-531), an unacylated ghrelin analog being developed for the treatment of Prader-Willi syndrome, and nevanimibe (ATR-101), an ACAT1 inhibitor for the treatment of two orphan adrenal diseases: classic congenital adrenal hyperplasia (CAH) and endogenous Cushing’s Syndrome. With the $30 million, the cash balance of the two combined companies will be about $70 million.

The release made no mention of OvaScience’s fertility assets, including its early-stage OvaPrime program for women with primary ovarian insufficiency and poor ovarian response.

Millendo Chief Executive Officer Julia Owens said the merger provides new opportunities for the companies as it positions Millendo to become a leader in rare endocrine diseases with the “funding needed to pursue the potential approval and commercialization of our first-in-class programs.”

“Our objective has always been to deliver meaningful therapies to patients who do not have sufficient treatment options, and with this merger, the compelling clinical data for our programs, and the initiations of late-stage trials for both livoletide and nevanimibe expected in the months ahead, we are optimistic that we can deliver on this vision,” Owens said in a statement.

Under terms of the merger agreement, Owens will continue to lead the company as president and chief executive officer, and Millendo’s headquarters will remain in Ann Arbor. The merger is expected to be completed in the fourth quarter of this year.