The senior leadership of Mahindra Group publicly apologised on Friday over the manner in which an employee at Tech Mahindra was asked to resign by the human resource executive – the recording of which has gone viral on social media.

“I want to add my personal apology,” the company’s chairperson, Anand Mahindra, said on Twitter. “Our core value is to preserve the dignity of the individual and we will ensure this does not happen in future.”

In the audio clip, the HR executive is heard asking the employee to resign by 10 am the next day as it was a corporate decision. The HR executive says the decision was made as part of the company’s “cost optimisation plan”.

When the employee asks for more time, the HR is heard threatening that if he did not put in his papers on his own accord, he will be terminated and will not receive his basic salary. “If you read your offer letter you would know the clause under which we are asking you to leave. It was mentioned in the offer letter. Then, why did you accept the offer letter,” the executive is heard saying.

Tech Mahindra’s Chief Executive Officer CP Gurnani said he regretted the way the employee was asked to resign. The company’s Vice Chairman Vineet Nayyar also said “corrective steps” were taken to ensure that the incident did not repeat in future.

“We continue to implement strategies to meet the changing demands of business…and align our workforce with the business objectives, strategic priorities of the organisation, and requirements of our clients,” Nayyar said. “This however, will be done in a manner that befits our Rise philosophy and our Group’s core values.”

At the end of December 2016, Tech Mahindra had over 1.17 lakh employees. The audio clip surfaces at a time when there have been several reports of massive layoffs by various software giants. Companies are facing a tough time because of automation, a change in technology, stress on digital services, stricter visa rules and a sluggish global economy.