The health insurer Anthem said that it had agreed to acquire its rival Cigna in a deal that values its rival at $54.2 billion, the latest in a consolidation push among the nation’s biggest health insurers.

The deal would shrink the number of major health insurers in the United States and comes just weeks after Aetna agreed to acquire Humana, the smallest of the big five insurers, for $37 billion in cash and stock.