A firm that faced the prospect of complete collapse has been spared in the final hour by a buyout that secures the future of its office in Sudbury.

The fate of staff at the warehouse and distribution firm Prolog had hung in the balance after it went into administration in November.

In a last-minute deal, three of the six current Prolog sites have been sold in a management buyout to Prolog Fulfilment Limited - two at Sherwood Business Park in Nottingham, where the company has its headquarters, and also the one in Sudbury.

Under the sale agreement, Prolog Fulfilment Limited will operate the three remaining sites on behalf of the joint administrators from Mazars LLP, as they seek to secure deals for the remainder of the business.

Prolog employs 96 employees plus agency staff at its contact centre in Sudbury, and all the jobs in Suffolk are now understood to be safe.

The acquisition was led by former Prolog management team Neil Daniells and Nick Hoare, who explained that Prolog Fulfilment will now only operate in the e-fulfilment and returns market sectors.

In a statement, the new management team said: “We are really excited by the opportunities ahead to build a company renowned for flexibility, with a can-do attitude for providing solutions that support our clients’ growth in this difficult market place, whilst being an employer of choice for our local workforce”.

Joint Administrators Rebecca Dacre from Mazars LLP, who had been working on the case with her colleague Simon Chandler, explained that they are “working hard to secure the future of the business and to protect as many jobs as possible in the coming weeks”.

Prolog had continued to work at full capacity since the administrators were appointed in November, and Mazars said the acquisition was made possible thanks to the “huge dedication of the employees in the face of some considerable challenges”.

Suffolk South MP James Cartlidge said he was “delighted to hear the news, which will be very welcome for all those employed on the site”.

The South Suffolk economy has been struck by a series of blows recently, with 500 jobs being shed when Philips Avent closes its factory down in Glemsford, and Delphi Diesel Systems closing its factory in Sudbury next year too.

“Yes, we have had major setback with Philips Avent, but this news reminds us that there is much to be positive about,” said Mr Cartlidge. “Not only does unemployment remain historically low, we continue be seen as an attractive place to invest with significant interest in Delphi that I hope will crystallise at some point, and now this very welcome news. The UK and South Suffolk remain open for business”.

Prolog had once employed 400 people in Suffolk, where it had its head office.

Prolog’s chairman Robert Audley had drawn up plans to expand his business, with build two huge warehouses, offices and a service yard on land off Church Field Road. In 2014, it gained permission to expand, but objectors won a challenge against the scheme in the High Court and shortly after that, Prolog moved it’s head office to Nottingham.

Prolog then moved its Sudbury office from Sulby House in the town’s North Street to Northern Road.