Intel Corp on Thursday said Chief Executive Officer Brian Krzanich has resigned, effective immediately, after a probe revealed that a past consensual relationship with an Intel employee violated company policy.

“An ongoing investigation by internal and external counsel has confirmed a violation of Intel’s non-fraternization policy, which applies to all managers,” the company said in a statement.

The board named Chief Financial Officer Robert Swan as interim chief executive officer.

Krzanich had been in the role since May 2013.

Intel said its board has begun a search for a permanent CEO, including both internal and external candidates, and will hire a an executive search firm to assist in the process.

The company also forecast better-than-expected second quarter revenue and profit.

Shares of the company rose 2.1% to $54.59 in premarket trading.

Intel said it expects quarterly revenue of about $16.9 billion and adjusted profit of about 99 cents per share. Analysts on average were expecting revenue of $16.29 billion and adjusted profit of 85 cents per share.