U.S. health insurer Centene confirmed on Wednesday that it would buy WellCare Health Plans in a cash-and-stock deal to bulk up its government-backed health-care business, valuing its smaller rival at $15.27 billion.

Reuters had reported on Tuesday that the companies were in advanced talks over a deal.

Shares of WellCare jumped 23 percent and were currently trading 12.5 percent higher at $260.28, while those of Centene fell about 7 percent before the bell on Wednesday.

The acquisition would likely reduce Centene's dependence on the Obamacare health-care exchanges at a time when the Trump administration has stepped up its assault on former President Barack Obama's signature health-care law.

Earlier this week, the Department of Justice (DOJ) backed a federal judge's ruling that Obamacare violated the U.S. Constitution because it required people to buy health insurance.

Centene relies on its Obamacare business for about 40 percent of its earnings, making it vulnerable to the DOJ decision, according to SVB Leerink analyst Ana Gupte.

The deal for WellCare could also allow Centene to better compete against large rivals UnitedHealth and CVS Health in the aftermath of a wave of consolidation that swept across the U.S. health-care sector.