GSK Plc has agreed to buy Affinivax Inc. for as much as $3.3 billion, bolstering its vaccines pipeline as the U.K. pharmaceutical company prepares to split with its consumer-health unit.

The agreement includes an upfront payment of $2.1 billion and two potential development milestones, GSK said in a statement. The transaction for the closely held company is expected to close in the third quarter.

GSK is snapping up next-generation vaccines as it moves closer to the planned spin-off of Haleon, the maker of Panadol painkillers and Sensodyne toothpaste, in July. Last month, it announced a takeover of Sierra Oncology, a maker of targeted therapies for rare forms of cancer.

The deal with Affinivax “provides access to a new, potentially disruptive technology, and broadens GSK’s existing scientific footprint in the Boston area,” Chief Scientific Officer Hal Barron said in the statement.

The drugmaker, which has faced pressure from activist investor Elliott Investment Management and lingering questions about its pipeline, has signaled it would look for more deals. GSK needs further steps to build up its stable of novel drugs in advanced stages of development, Bloomberg Intelligence analysts said after the Sierra Oncology transaction.

Affinivax is developing a new class of vaccines, the most advanced of which are targeting pneumonia, meningitis and bloodstream infections, as well as milder diseases such as sinusitis. The deal gives GSK a pneumococcal vaccine candidate in mid-stage development.