Horizon Pharma hznp said it would buy Raptor Pharmaceutical rptp for nearly $800 million to bolster its portfolio of drugs to treat rare diseases and reduce its dependence on the primary care market.

The deal will give Horizon drugs used to treat diseases including rare metabolic disorders and lung infections.

Horizon said it would offer $9 for every Raptor share, representing a 21% premium to Raptor’s Friday close. Raptor’s shares were trading at $8.96, just shy of the offer price.

Horizon’s chief executive, Tim Walbert, has been vocal about his desire to expand Horizon through acquisitions at a time when valuations in the life sciences sector are down significantly from their 2015 highs.

 

Walbert has said he wants to increase Horizon’s focus on rare diseases, pivoting the company away from primary care where pricing pressure has been more pronounced.

The pharmaceutical industry is taking a greater interest in so-called orphan drugs because their strong patent protection helps ensure reliable pricing power for drug makers.

 

 

Horizon last year launched and abandoned a hostile bid to acquire peer Depomed depo , after a California court ruled that there was a risk that the overture was based on improper use of confidential information.

The company intends to finance the Raptor transaction through $675 million of external debt along with cash on hand and expects the deal to close in the fourth quarter.

Raptor generated $94.2 million revenue in 2015 and has previously said it expects $125 to $135 million in 2016.

The company’s Procysbi is approved in the United States for the treatment of a rare metabolic disorder, while Quinsair is approved in Europe and Canada for the treatment of chronic pulmonary infections in adults with cystic fibrosis.

Earlier this year, Horizon acquired Crealta for $510 million, adding its gout treatment to a portfolio of drugs focused on rare diseases, rheumatology and primary care.