Generic drugmaker Mylan said it would buy Abbott Laboratories' specialty and branded generics business in developed markets outside the United States in an all-stock transaction valued at about $5.3 billion.

Mylan's shares were up 7 percent in premarket trade after the announcement of the deal that gives it access to Abbott's key products such as gastroenterology drug Creon, pain drug Brufen and influenza vaccine Influvac.