The chief executive officer of a Karachi-based software house was asked to resign on Friday after a newly recruited female employee was told to either stop wearing her hijab at work or leave.

The incident came to light through a Facebook post which detailed how the female recruit, just a few days into her employment with Creative Chaos, was told by her line manager that she could keep her job only if she would take off her hijab.

The said person told Dawn.com that the implication was that her wearing the hijab would spoil the company’s image as an "all-embracing" workplace.

Read: Hijab — a hurdle for a job?

The discriminatory policy was reportedly defended in a meeting of the affected employee with the company's CEO, Jawwad Kadir, who, the woman claims, refused to make the demand in writing but pushed her to resign, even recommending her two Islamic banks as possible alternatives.

The victim says that she was also warned not to consider legal options against the company.

After the Facebook post narrating the incident went viral and drew sharp criticism on social media, Kadir publicly confirmed that the incident had indeed taken place, and also issued an apology.

"Yesterday, a senior member of our staff asked a colleague to resign on unprofessional and unethical grounds," admitted Kadir. "She was told that her obligations may come in the way of her performance.

"Not only is this action disgraceful but shows extremely poor moral judgement by her hiring manager. I take full responsibility for this failure and am deeply ashamed that a colleague was put through distress and trauma."

Apology shared by Creative Chaos on Facebook.

Read: Guard who denied women entry to Punjab secretariat 'for not wearing dupatta' issued show cause notice

Kadir, in his public apology, stated that the manager responsible had been suspended and a transparent inquiry ordered. Moreover, he said that the victim has been asked to withdraw her resignation and resume her job.

However, his initial statement made no mention of the employee's claim that he himself had also asked her to resign on the controversial grounds.

Later in the evening, the software house in a Facebook post said Kadir had been asked to step down "for workplace discrimination".

In an email sent to board members and associates, titled "My apology is not enough", Kadir said he was resigning as CEO of the software house.

"I have crossed a line which I deeply regret," Kadir wrote in the email, a copy of which was provided to Dawn.com by a source.

"I have jeopardised the image of Creative Chaos and tarnished its reputation due to my inability to act in accordance with the ethos of [the company] and moral code of human decency," he added. "The buck stops at the CEO."