NEW YORK (CNNMoney.com) -- Diebold Inc. said Thursday it has sold its voting machine business to Election Systems & Software, Inc., in a deal that could result in a $55 million loss for the ATM maker.

Premier Election Solutions, Inc., the subsidiary that makes up the bulk of Diebold's voting machine business, will be sold to ES&S for $5 million plus payments representing 70% of any cash collected on Premier's outstanding accounts receivable as of Aug. 31.

Diebold said it expects to suffer a pre-tax loss in the range of $45 million to $55 million related to the sale.

The North Canton, Ohio-based company entered the election systems business in 2002, when it purchased Global Election Systems, Inc. But it began looking for "strategic alternatives to ownership" for that business in 2006.

In 2007, Global Election Systems was renamed Premier and was made a subsidiary. Since that time, Diebold said it had only a financial interest in Premier and was not involved in its operations.

Electronic voting machines, which were pushed by local governments ahead of the 2000 election, have come under criticism for security concerns.

Gil Luria, an analyst who covers Diebold for Wedbush Morgan Securities, said the sale is "a very good thing" for the company.

"It removes a big distraction and a public relations challenge they've had over the last few years," Luria said, adding that Premier had been losing money for Diebold in recent years.

Diebold said Premier generated $88.2 million, or 2.8%, of its total revenue in 2008.

Luria said the charges related to the sale were not surprising and were mostly related to accounting issues and existing law suits.

Aldo Tesi, chief executive of ES&S, said in a statement that the company is committed to "maintaining voter confidence."

The acquisition will create a more efficient and effective operating model, ES&S said, which will provide a "sustainable delivery platform for the election industry in the future."

Diebold also operates a Brazilian subsidiary that makes voting machines for that country's elections. That subsidiary, Tribunal Superior Eleitoral, will not be affected by Thursday's transaction.

Shares of Diebold (DBD) were about 2% higher in extended trading after closing at $30.03 in New York.