The CEO of chip giant Intel stepped down Thursday following the revelation that he had an affair with a subordinate.

Brian Krzanich, who took over Intel in 2013 and saw its stock price rise more than 120 percent during his tenure, offered his resignation after the company discovered the 58-year-old exec had a “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-fraternization policy, which applies to all managers,” the statement said.

Intel’s policy forbids managers from having romantic or sexual relationships with anyone who reports to them either directly or indirectly.

The board named Chief Financial Officer Robert Swan as interim CEO. A search for a permanent replacement has begun.

Intel shares dropped 2.4 percent on Thursday, to $52.19.