Jan 25 (Reuters) - NCR Corp said on Monday it would buy Cardtronics Plc in an all-cash deal valuing the ATM operator at about $2.5 billion, including debt, after outbidding investment firms Apollo Global Management Inc and Hudson Executive Capital LP.

Atlanta-based NCR, which makes ATMs and self-service kiosks for retailers and restaurants, will buy all outstanding shares of Cardtronics for $39 apiece, according to the statement. The price represents a discount of about 4.6% to Cardtronics' last close. (https://refini.tv/36cXBuL)

The deal comes after funds managed by affiliates of Apollo and Hudson Executive Capital LP decided not to raise their earlier bid of $35 per share for Cardtronics.

Cardtronics runs 285,000 ATMs in 10 countries and has processed 2.6 billion transactions since 2019, according to its website. Its customers include big financial institutions, large merchants, small businesses and independent ATM distributors.

With a 19.44% stake, Hudson Executive is Cardtronics' largest investor, according to Refinitiv data. The Houston-based operator also counts Blackrock Institutional Trust and Vanguard Group among its investors.

NCR's Chief Executive Officer Michael Hayford said the deal would pave the way for the combined company to connect their retail and banking customers. BofA Securities was the financial adviser to NCR, while Goldman Sachs & Co was the financial adviser for Cardtronics.

(Reporting by Niket Nishant in Bengaluru; Editing by Devika Syamnath)