Ginni Rometty is leaving the role of IBM CEO, the company said.

She'll be replaced by Arvind Krishna, IBM's senior vice president of cloud, on April 6.

Jim Whitehurst, the CEO of Red Hat — which IBM acquired last year in a $34 billion megadeal — will become IBM's president on the same day.

Rometty will remain IBM's executive chairman through the end of the year, at which point she'll retire from the company entirely. It was her decision to leave, and the news comes at the conclusion of a long CEO search, according to a person familiar with the company.

Her run saw IBM's revenues go through a long period of steep decline, even as she presided over the Red Hat acquisition.

IBM's Ginni Rometty era is ending.

Rometty is stepping down as CEO of IBM in April after an eight-year tenure that saw the 108-year-old tech company go through a difficult transition to the cloud-computing era, the company said Thursday. It was her decision to leave, and the news comes at the conclusion of a long CEO search, according to a person familiar with the company.

She will be replaced as chief executive by Arvind Krishna, IBM's senior vice president of cloud. That same day, Jim Whitehurst, the CEO of IBM's Red Hat subsidiary, will become president of IBM. IBM bought Red Hat for $34 billion in a deal announced in 2018 that closed in July.

After the transition, Rometty will remain in her role as executive chairman of the company through the end of the year, after which she'll leave IBM entirely, ending an era that began when she first joined as a systems analyst in 1981.

"Arvind is the right CEO for the next era at IBM," Rometty said in a statement. "He is a brilliant technologist who has played a significant role in developing our key technologies such as artificial intelligence, cloud, quantum computing and blockchain. He is also a superb operational leader, able to win today while building the business of tomorrow."

Rometty praised Krishna's role in boosting the tech giant's position in the cloud, the trend that allowed businesses to set up their networks on web-based platforms run by the likes of Amazon, Microsoft, and Google. The cloud made it possible for enterprises to scale down or even abandon private data centers, which hurt the business of traditional enterprise-tech players like IBM.

IBM shares have been declining as the company struggles to adapt to the shift in the enterprise-tech market, even amid the rise of the dominant Amazon Web Services and the reemergence of Microsoft as a major cloud player. From $213 a share in 2013, IBM shares have slid to about $140, closing at $137 on Thursday.

But IBM has been focusing a newer trend called hybrid cloud, in which businesses maintain networks on public-cloud platforms while keeping huge chunks of their data and applications in in-house data centers. Rometty and Krishna have said they expect IBM to dominate what they predict will be a $1 trillion market.

The acquisition of Red Hat last year, which Krishna spearheaded, was supposed to be a key part of this strategy. Based on IBM's most recent earnings report, buying Red Hat is paying off for Big Blue. IBM's revenue had been slipping, but it posted a modest gain at $21.78 billion earlier this month. That was thanks in part to Red Hat revenue, which exceeded $1 billion in the fourth quarter, up 24% year over year.

"Arvind has grown IBM's cloud and cognitive software business and led the largest acquisition in the company's history," Rometty said. "He is well-positioned to lead IBM and its clients into the cloud and cognitive era."

The announcement sent IBM's stock up 5%, or about $6, in after-hours trading. It also ends speculation over Rometty's departure and her replacement. Whitehurst was seen as a possible successor given his role at Red Hat, which is expected to be a critical component of IBM's hybrid-cloud offensive.

Rometty called Whitehurst "a seasoned leader who has positioned Red Hat as the world's leading provider of open source enterprise IT software solutions and services, and has been quickly expanding the reach and benefit of that technology to an even wider audience as part of IBM."

"In Arvind and Jim, the Board has elected a proven technical and business-savvy leadership team," Rometty said.

Got a tip about IBM or another tech company? Contact this reporter via email at bpimentel@businessinsider.com, message him on Twitter @benpimentel or send him a secure message through Signal at (510) 731-8429. You can also contact Business Insider securely via SecureDrop.