(Reuters) - Bristol-Myers Squibb Co said it would buy privately held IFM Therapeutics for an upfront payment of $300 million, as the drugmaker looks to bolster its cancer portfolio after losing ground to Merck & Co’s rival treatment Keytruda.

The acquisition of IFM, whose backers include Novartis, will give Bristol-Myers access to the company’s preclinical cancer programs.

IFM investors are also eligible to additional contingent payments of up to $1.01 billion upon the achievement of certain milestones, the companies said on Thursday.

Bristol-Myers, which is also under pressure from activist investors, expects the deal to close during the third quarter.

The drugmaker has fallen behind Merck in the key field of immuno-oncology after its Opdivo drug failed to prolong survival in previously untreated patients with non-small cell lung cancer, the largest cancer market.