Diebold Inc. agreed to buy German rival Wincor Nixdorf AG for about 1.8 billion euros ($1.9 billion) to create the biggest maker of cash machines and security systems with more than $5 billion in sales.

Wincor investors will receive cash and stock valued at 54.32 euros a share, based on Friday's closing price for North Canton, Ohio-based Diebold, according to a statement Monday from the companies. That's 40 percent above where Wincor closed Oct. 16, the day before the two said they were in talks.

The two companies combined will have a market share of about 35 percent, ahead of NCR Corp. with an estimated 25 percent, according to Kepler Cheuvreux. Buying Paderborn-based Wincor gives Diebold a bigger presence in Europe, where it now generates less than 15 percent of sales. Wincor gets about 70 percent of its 2.47 billion euros in sales there. Founded in 1859, Diebold has about 16,000 employees.

"This is a good opportunity for the combined company and I see long-term potential," Wolfgang Donie, an analyst at Nord/LB, said by phone from Hanover. "Diebold is strong in the U.S. and Wincor in Europe, so they complement each other well regionally."

The combined entity will be called Diebold Nixdorf. The deal marks Diebold's largest acquisition, topping the purchase of Brazilian ATM maker Procomp for $225 million in 1999, according to data compiled by Bloomberg. When taking into account Wincor's net debt, the deal is valued at about $1.8 billion, Diebold said.

Wincor rose 4.9 percent to 48.03 euros at 9:15 a.m. in Frankfurt. Diebold gained 3.5 percent to $37.51 in New York Friday, giving the company a market value of $2.4 billion.

Wincor builds hardware and software, including ATMs and cash registers, for banks and retailers. The company used to be owned by engineering giant Siemens AG before it was sold to private-equity investors in 1999. It held an initial public offering in 2004 and currently operates in 130 countries with about 9,000 employees. Wincor announced a restructuring program including 1,100 job cuts amid declining sales and profit in April, citing slowing hardware revenue and a deterioration in Russia and China.

There's a high chance the deal will be completed because antitrust issues look "manageable," Kepler Cheuvreux's Stefan August in said last month.

Bankers from Credit Suisse Group AG and JPMorgan Chase & Co. advised Diebold, and Sullivan & Cromwell LLP served as legal adviser. JPMorgan and Credit Suisse are also providing financing for the transaction. Goldman Sachs Group Inc. advised Wincor Nixdorf, with Freshfields Bruckhaus Deringer LLP, who served as legal adviser.