Pfizer agreed on Monday to combine its off-patent drugs division, which sells treatments like the cholesterol drug Lipitor, with the pharmaceutical company Mylan, creating a potential powerhouse in the increasingly challenging business of producing generic medicines.

The deal follows years of consolidation in the generic-drug industry and could spur more acquisitions, as companies struggle to maintain sales amid falling prices for their products. It’s a development that has been largely overlooked as consumers grapple with the escalating cost of branded treatments.

Pfizer’s decision to combine the off-patent unit, Upjohn, with Mylan in an all-stock deal coincides with the pharmaceutical giant’s narrowing of its focus on more profitable, branded drugs. Though Mylan mainly produces generic drugs, it is best known for its EpiPen emergency allergy treatment.

The shift has led Pfizer to acquire promising new drugs through big deals like its $10.6 billion takeover bid last month for Array BioPharma, which makes specialized cancer treatments. Along the way, Pfizer has unloaded lower-margin businesses, as it did last year by agreeing to combine its consumer health care division with a similar unit owned by GlaxoSmithKline.