Nestlé had been reviewing its production of chocolate crumb - an ingredient made from milk, sugar and cocoa that is used in chocolate manufacture - after the loss of a major contract for Canada meant that two separate facilities was no longer economically viable.
The Irish company had been confident that Nestlé would favour it over the Girvan plant, but a British government subsidy of £205,000 appears to have swung the Swiss multinational in favour of the Ayrshire facility.
"It has been established that by sourcing all crumb through the Girvan site, Nestlé can achieve lower total costs," the company said in a statement. "Therefore, the plan is that the Scottish facility at Girvan will be retained while our Irish facility at Mallow will regrettably close."
The closure is planned to take place by March 2005.
But while Nestlé said it would do what it could to find alternative employment for the 57 workers at the Irish plant, transferring production to Girvan will create no more than 10 or so new jobs there, leaving the majority of the Mallow workers facing an uncertain future.
But their cause has already won the support of the local MP, Joe Sherlock, who has called on Ireland's Minister for Enterprise, Trade and Employment, Michael Martin, to intervene in a bid to protect jobs not only at the plant itself but also at local sugar processors which supply it.
Dairygold is also preparing a legal case against Nestlé, arguing that under the terms of its agreement the Swiss group has no right to take such a unilateral decision, especially as the Nestlé plant is part of Dairygold's own Mallow facilities.
Dairygold employs another 60 people in the same complex, as well as supplying Nestlé with milk, and it is thought that the closure would have a devastating effect on the Irish firms' own long-term viability.