Hundreds of roadside café workers are to receive tens of thousands of pounds each after winning a near two-decade court battle to enforce the dying wish of their former boss.

More than 600 people working for Roadchef, which has 21 service stations in England, Wales and Scotland, were set to benefit after their former managing director Patrick Gee, who had led the 1983 management buyout of the firm, decided to give them about 20 per cent of its shares in the mid-1980s.

However, he died while the scheme was being set up and his successor, Tim Ingram Hill, later managed to take control of the shares, which made him about £29m when the company was sold in 1998.

The Roadchef Employee Benefits Trustees Ltd (REBTL) sued, but after winning a court judgment in its favour last year it has only now managed to agree a confidential settlement with Mr Ingram Hill, believed to be between £20m and £30m. This would result in the average worker receiving up to £50,000, although negotiations are continuing with HM Revenue and Customs about tax.

Chris Nott, a lawyer who worked on the Roadchef case for more than two decades, said: “We’ve been told numerous times over the past 20 years that the case was ‘undoable’. but we believed in it. It’ll be pleasing to the thousands of ordinary people who stand to benefit that our persistence has paid off.”

He said the method used by Mr Ingram Hill, who now runs a vineyard in Wiltshire, to transfer the shares from the employee scheme was first discovered in company documents by Roadchef’s company secretary Tim Warwick.

“We shared the view that something wasn’t right and began to put the jigsaw together from these early pieces,” said Mr Nott, a partner at Capital Law. “Tim [Warwick] deserves credit for his actions, particularly coming as they did at a time before whistleblowers were protected.”

Patrick Gee, who died from hepatitis at the age of 43, had planned to turn Roadchef into a John Lewis-style company owned by its employees. He wanted staff to accrue shares gradually on the basis of their length of service.

When the company was sold to Japanese investors in 1998, the GMB claimed that the qualifying employees should each have received up to £90,000, but they actually got as little as £2,300.

It emerged that Mr Ingram Hill had transferred millions of shares from one employee benefit trust to another in 1995 and the latter fund, called EBT2, then granted him the share options.

In last year’s court case, the employees claimed that the transfer of shares between the two employee benefits trusts was “a breach of trust… or fiduciary duty”, and that “Mr Ingram Hill dishonestly assisted in the breach, subsequently receiving the shares in the knowledge that they had been transferred in such breach”.

At the time the transfer was made, Mr Ingram Hill was chairman of Roadchef, director of the REBTL, and director of the EBT2 trust.

“The judge found that the transfer was part of a preconceived plan to acquire the shares, and that Mr Ingram Hill had exerted improper pressure on the other directors, who simply did what they were told, believing they had no other choice,” Capital Law said in a statement.

Speaking after the sale, one ex-Roadchef worker said: “The whole thing stinks. Wealth that should have been for all has ended up as the fortune of one man.”

After the judge declared that the key share transfer was “void”, the actual amount to be paid to the workers was left to a later hearing and both sides appealed elements of the judgment. But these arguments did not reach court because of the settlement that has just been agreed. There was no suggestion that Mr Ingram Hill acted illegally.

Starting out as a pheasant plucker, he worked in the kitchens of the Grosvenor House Hotel in London. He went on to run the Travellers Fare cafés at London’s railway stations before joining Roadchef .

The sale of Roadchef helped him to become one of Britain’s richest people. In 2009, he was put in 863rd place on The Sunday Times Rich List, which estimated that his family’s fortune was worth £65m.

Asked whether he thought he thought he had done anything wrong or if he believed the shares rightly belonged to him, Mr Ingram Hill said in a statement issued by a public relations firm: “I wish the employees of Roadchef the very best and I am obviously delighted there has been an amicable settlement.”