AbbVie Inc. has agreed to acquire Pharmacyclics Inc. in a transaction valued at $21 billion, according to a statement released by the two companies on Wednesday. The deal would give AbbVie control over Pharmacyclics’ flagship Imbruvica drug, which is used to treat blood cancer.

Chicago-based AbbVie will acquire all of the outstanding shares of Pharmacyclics through a tender offer. Under the terms of the deal, AbbVie will pay $261.25 per share comprised of a mix of cash and AbbVie equity, the two companies said, in the statement. The deal values the smaller drugmaker at a premium to its current market value of $16.5 billion. AbbVie reportedly outbid rivals also looking to acquire the Sunnyvale, California, drugmaker.

“Its flagship product, Imbruvica, is not only complementary to AbbVie's oncology pipeline, it has demonstrated strong clinical efficacy across a broad range of hematologic malignancies and raised the standard of care for patients,” Richard A. Gonzalez, chairman and CEO of AbbVie, said, in the statement. 

The drug, whose sales are reportedly expected to grow to $3.56 billion over the next three years, has already been approved for use in treating several different types 0f blood cancer.

The joint announcement comes just hours after the Financial Times reported, citing people familiar with the matter, that Johnson & Johnson was nearing a deal to acquire Pharmacyclics. According to a Forbes report, AbbVie apparently outbid several other companies that were interested in the biotech company.

Shares in Pharmacyclics closed at $230.48, up 6.3 percent, in U.S. trading on Wednesday.