Intel chief executive Brian Krzanich is interviewed on the floor of the New York Stock Exchange in 2017. Krzanich is resigning after the company found out about a consensual relationship he had with an employee that was in violation of Intel's non-fraternization policy for managers. (Richard Drew/AP)

Intel chief executive Brian Krzanich resigned after an investigation showed he had a consensual relationship with an employee, a violation of the company's non-fraternization policy for managers, Intel said in a statement Thursday.

His departure comes amid a broad reexamination of the treatment of women in the workplace and in informal business arrangements in Hollywood and Silicon Valley. In this case, the affair was consensual. But Intel has a strict policy that forbids managers from having romantic or sexual relationships with employees.

Intel declined to provide further comment. Krzanich did not respond to request for comment.

Non-fraternization rules vary widely across corporate America. But amid the #MeToo movement backlash, many companies have been shoring up their policies — or jettisoning executives who violate standards of conduct.

These policies, also called "intimate relationship policies" or "workplace romance policies," typically prohibit relationships between a manager and direct or indirect reports, lawyers who deal with employment issues say. But some companies even require workers to report relationships with peers.

Chief executives face extra scrutiny. "If you are in the C-suite, you have influence over everyone," said Jonathan Segal, a Philadelphia-based employment lawyer.

Earlier this year Lululemon chief executive Laurent Potdevin resigned after revelations of a relationship with an employee. Leaders of Priceline, Best Buy and Pixar, a division of Disney, also left over workplace romances or misconduct.

But none have led a company as large as Intel, which is worth $245 billion and rarely has turnover at the top. Krzanich is only the company's sixth chief executive since it was founded in 1968.

Now 58, Krzanich started at Intel in 1982 as a process engineer. Although the company is best known as a computer chip maker whose logo often can be found on the outside of personal computers, it had been diversifying under Krzanich's leadership and pushing into servers and the Internet of things. The company's stock closed down more than 2 percent on Thursday.

His resignation also includes his role as a member of Intel's board of directors. Krzanich’s 2017 compensation was valued at $21.5 million, according to regulatory filings. Intel said it is beginning a search for a permanent chief executive and will consider candidates both inside and outside the company. The company's chief financial officer, Robert Swan, will be interim chief executive, Intel said.

Krzanich was at the helm when Intel announced critical flaws in its microchips, called Spectre and Meltdown, early this year. The flaws could have in theory allowed hackers access to data stored on most computers and smartphones sold over the past few years.

Krzanich is married and has appeared in a variety of news reports with his two daughters at software coding competitions.

Staff writer Jena McGregor contributed to this report.