Intel chief executive Brian Krzanich is resigning after the company learned of a consensual relationship that he had with an employee.

The company, one of the world’s largest makers of semiconductor chips, said that the relationship was in violation of the company’s non-fraternization policy.

“Intel was recently informed that Mr Krzanich had a past consensual relationship with an Intel employee,” the company said in a statement.

“An ongoing investigation by internal and external counsel has confirmed a violation of Intel’s non-fraternisation policy, which applies to all managers. Given the expectation that all employees will respect Intel’s values and adhere to the company’s code of conduct, the board has accepted Mr Krzanich’s resignation.”

Details of the relationship remain unclear. The relationship took place “some time back,” people familiar with the situation told CNBC.

Krzanich’s resignation conforms to a new spirit in corporate America that influenced by #MeToo era, is now under intense pressure to enforce workplace policies on gender equality and sexual harassment.

While many employers do not allow managers to have relationships with co-workers, irrespective of whether they have direct management responsibility over their partner, others take no position on consensual relationships within the company.

But like many tech firms, Intel’s employment profile is heavily weighted toward men. In its 2017 diversity report, the company said 73.5% of its total workforce was male. Intel has said it is working to increase gender and racial diversity.

Krzanich, 58, joined Intel in 1982, and rose through a series of technical and leadership roles to become chief executive in 2013. He lately emerged as a leading advocate for the commercial drone industry and is successfully transitioning from being a chip maker to a data services firm.

In abruptly exiting the company, he adds his name to a growing list of CEOs who have left leading public companies after details of intra-employee relationships were revealed.

They include Harry Stonecipher, who left as CEO of Boeing in 2005; Steven Heyer, who left Starwood Hotels in 2007; and Christopher Kubasik, who was the CEO-in-waiting when he left Lockheed Martin in 2012.

The board said chief financial officer Robert Swan would become interim CEO effective immediately. Swan joined Intel in 2016 from eBay.

The company also said it had started a search for a permanent leader and is considering internal and external candidates.