American payment processing company Global Payments announced Tuesday that it will acquire smaller rival Heartland Payment Systems in a $4.3 billion cash-and-stock deal. The acquisition would create a company that would serve approximately 2.5 million customers, Global Payments said, in a statement released Tuesday.

Under the terms of the deal, Global Payments will pay 0.6687 of its own shares and $53.28 in cash for each share of Heartland. Current Global Payments shareholders will own about 84 percent of the merged entity.

The deal valued Heartland at about $100.31 a share -- a 21 percent premium over the stock’s closing price Monday.

On Tuesday, Heartland’s shares closed up 2.9 percent, and surged 11.7 percent in after-hours trading. Shares of Global Payments also rose 1.6 percent during day trade, to $71.43.

“This partnership with Heartland marks a major milestone for our company, significantly enhancing our direct presence in our largest market and transforming Global Payments into the leading provider of integrated payments technology solutions in the world,” Global Payments CEO Jeffery Sloan said, in the statement.

The deal comes nearly two years after Global Payments acquired Payment Processing -- a company that served small and midsize U.S. merchants -- for $420 million, and at a time when both Heartland and Global Payments have suffered high-profile data breaches.

The deal is expected to close by the end of next May, pending approval by Heartland’s shareholders and regulators.