Intel Corp.'s  (INTC)  CEO is out. 

Brian Krzanich resigned on Thursday, June 21 after it was revealed that he had a previous consensual relationship with an Intel employee. The company has a non-fraternization policy in place.

"Intel was recently informed that Mr. Krzanich had a past consensual relationship with an Intel employee," the company wrote in a press release. "An ongoing investigation by internal and external counsel has confirmed a violation of Intel's non-fraternization 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." 

Intel named Robert Swan, CFO, as the interim CEO. Swan has been an executive vice president and Intel's CFO since October 2016; previously he was general partner at private equity and VC firm General Atlantic and CFO of Ebay Inc. (EBAY) for nine years.

"The Board believes strongly in Intel's strategy and 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," said Andy Bryant, Intel Chairman.

Krzanich first became Intel's CEO in 2013 after having served as chief operating officer. He started his career there as an engineer in 1982 right after graduating from college.

In its press release, Intel also announced that it expects to see second quarter revenues of $16.9 billion. Its second quarter results will be released on July 29.

In morning trading, Intel was down 1.2% to $52.79 after initially rising close to 2%. Year to date, shares are up about 14%, compared to the Nasdaq's 13% rise over the same time period. 

More from Technology

Biotech and Broadway Come Together to Fight Cancer

Biotech and Broadway Come Together to Fight Cancer

Flashback Friday: Bye Bye FAANG

Flashback Friday: Bye Bye FAANG

Jim Cramer: Micron's Buyback May Stabilize the Stock

Jim Cramer: Micron's Buyback May Stabilize the Stock

Jim Cramer Talks Micron, Nvidia, Reefer Madness and the Philadelphia Eagles

Jim Cramer Talks Micron, Nvidia, Reefer Madness and the Philadelphia Eagles

Cramer: Get Your Kids Fluent in Salesforce

Cramer: Get Your Kids Fluent in Salesforce