Brian Krzanich resigned as chief executive officer Intel Corp. after the chipmaker learned he previously had a consensual relationship with an employee, a violation of the company's policies.

Chief financial officer Bob Swan was made interim CEO while the board searches for a permanent replacement, the company said in a statement Thursday. Krzanich is the latest in a string of CEOs forced out for having an inappropriate relationship. Lululemon Athletica and Priceline Group had to replace their leaders for similar reasons.

Krzanich's ouster throws into turmoil the leadership of a company that has been a model of stability and organization for 50 years. Krzanich, 58, leaves Intel at record performance levels financially but facing a group of new challengers as the computer processing market it dominates reshapes itself to deal with new trends, such as artificial intelligence.

Intel raised its second-quarter revenue and profit forecast Thursday. It said it's expecting revenue of about $16.9 billion and adjusted earnings per share of about 99 cents when it reports results on July 26.

The shares declined $1.27, or 2.38 percent, to close at $52.19.

A change in leadership shouldn't cause any major problems for Intel, said Kevin Cassidy, an analyst at Stifel Nicolaus & Co. "Intel's a big machine and one person isn't going to change the strategy that the board and Brian was a part of."

But during a five-year stint as CEO, Krzanich upended Intel's executive mentoring approach and pushed out several internal leaders, some of who vied with him for the top job. That leaves a thinner executive bench from which to pick a successor, and forces the company to look outside to potentially lure back some of the talent who left or were pushed out.

Leaders who may have stepped into the CEO role in this situation but who left include Renee James, Stacy Smith, Dadi Perlmutter, Kirk Skaugen, and Dianne Bryant. The remaining leadership team includes only one who came up through Intel's ranks, Navin Shenoy, while prominent outsiders who joined include Murthy Renduchintala.

Whoever takes over must maintain Intel's lead in data-center chips, find a way to crack the mobile device market, integrate a series of acquisitions, and oversee an expansion into new businesses such as automotive components and the so-called Internet of Things.

Intel said on Thursday it has a "robust succession planning process in place and has begun a search for a permanent CEO, including both internal and external candidates."

Some analysts disputed the "robust" characterization, while others said Intel shares could be "dead money" until the company provides clarity on succession.

"Given so much change driven by Mr. Krzanich, his departure could make succession planning and further transition challenging," said Cowen Inc. analyst Matt Ramsay.

Intel has always appointed leaders from within its own ranks. Krzanich, 58, was promoted to president after a competition with peers. Then, in 2013, he won another battle for the CEO position after predecessor Paul Otellini left.

Once in charge, Krzanich, who is known as BK, replaced former rivals, such as James, Smith, and Perlmutter, largely with appointees from outside. The leaders of Intel's biggest business groups, Skaugen and Bryant, also left to work for Intel customers during Krzanich's tenure.

Shenoy, a 44-year-old head of the data-center business, is the only current member of Intel's top echelon who came up through a long-established system whereby promising junior executives were apprenticed to senior leaders, then moved between various roles to gain experience.

Although the system is still in place, Krzanich presided over the biggest-ever inflow of outside appointees into the company's senior ranks. The new guard, led by Swan, a former eBay CFO, was brought in to kick-start efforts to enter new markets with products outside of Intel's traditional strength in personal computer microprocessors.

The most-prominent outsider is Renduchintala, who oversees chip operations. He was recruited from Qualcomm Inc., the biggest maker of chips that power mobile phones, a market Intel has struggled to crack for decades. Other outsiders who joined include Tom Lantzsch, a former executive at Arm Holdings, a leading mobile chip-design company.