In another merger of health insurance giants, Anthem has agreed to acquire Cigna in a $54 billion deal.

Anthem (ANTM), a Blue Cross and Blue Shield insurer, said it would buy all of Cigna's (CI)shares in a cash and stock transaction.

The deal is expected to close in the second half of 2016, if it passes state regulatory approvals and other requirements. The merged insurer would cover 53 million members.

The merger would leave only three major players in the insurance industry.

Earlier this month, Aetna (AET) struck a deal to buy Humana (HUM) for $37 billion, which would cover 33 million members.

The third remaining health insurer is UnitedHealth (UNH), which just completed its own $12.8 billion acquisition of Catamaran, a pharmacy-benefits manager and prescription provider.

There are titanic shifts going on in the entire healthcare space, where pharmacies are undergoing their own wave of consolidation. In May, CVS Health (CVS) agreed to acquire Omnicare (OCR) for $12.7 billion. And back in February, Rite Aid (RAD) agree to acquire EnvisionRx for $2 billion.

Hospital companies have also been expanding.

Experts say one factor driving the mergers is the Affordable Care Act.

Obamacare has meant more business for major insurers because more Americans have health coverage, but the law has also put more pressure on industry profits.

Related video: And then there were three. What will mergers do to healthcare costs?

Some doctors are concerned that the mergers will put too much power in just a handful of insurance companies. The American Medical Association said the mergers will "reduce competition and decrease choice."

There are also worries that costs for customers will go up because of less competition.

But the health insurers are defending their move.

"This will actually improve efficiencies and reduce costs for consumers down the line," said Cigna spokesman Matt Asensio.

This is assuming that the merger gets past federal regulators, which remains to be seen.

"The DOJ and FTC are going to look at this hard," said Tucker Sharp, chief broking officer for Aon Heatlh, a consultancy for health insurers. "They were already concerned that there wasn't enough competition."

Sharp said that because of Obamacare restrictions, insurers lack the power to raise prices when they want.

He said Cigna customers might end up with more choices of doctors in an expanded provider network. However, its increased clout could hurt smaller competitors, who might see their network of doctors shrink.

Cigna is active in the U.S. and 29 other countries, primarily through employer benefits for ex-pats working around the world. Anthem serves customers in 26 states.

Cigna has been a big player among employers and has only dipped its toe into offering coverage through Obamacare exchanges. Anthem is a major presence in Obamacare plans.

Moody's Investors Service placed Cigna's debt ratings on review for downgrade following the merger announcement. Moody's said Anthem would assume $5.1 billion in Cigna's notes, and that its review "will focus on the completion of the transaction and the impact on Anthem's ratings."

Related: Will the mergers make you pay more for health insurance?

--Tami Luhby contributed to this report.