Intel Corp. (INTC) CEO Brian Krzanich resigned today from his executive position and his role on the board of directors in the wake of a “past consensual relationship” with an employee, the company said in an unexpected press release today.

Intel says Krzanich, 58, violated the company’s policy regarding “non-fraternization.” CFO Robert Swan will serve as interim CEO as Intel searches for Krzanich’s replacement. Swan, who has served as CFO since October 2016, will manage operations in close collaboration with Intel’s executive leaders.

“An ongoing investigation by internal and external counsel has confirmed a violation of Intel’s non-fraternization policy, which applies to all managers,” Intel said in the release. “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.”

Intel Policy Violated

Intel said it was only recently made aware of Krzanich’s controversial relationship. Per company policy, Intel managers cannot have a relationship of any kind with employees who answer to them. His relationship reportedly has already ended and occurred “some time back,” according to unnamed sources cited by CNBC.

“We are confident in Bob Swan’s ability to lead the company as we conduct a robust search for our next CEO. Bob has been instrumental to the development and execution of Intel’s strategy, and we know the company will continue to smoothly execute. We appreciate Brian’s many contributions to Intel,” Intel Chair Andy Bryant said in a statement.

Intel’s New Guidance

Separately, Intel increased its guidance for the second quarter, saying it expects earnings of 99 cents per share and $16.9 billion in revenue, up from 85 cents per share and $16.3 billion in revenue.

“With accelerating data-centric revenue, the company is off to an excellent start in the first half of the year and expects 2018 to be another record year,” the company said. Intel’s second-quarter results are expected July 28.

Shares were down 1.25% early in Thursday’s session. (See also: Intel’s Soaring Stock is Due for a 10% Pullback.)