Ms. Rometty, 54, is well known within the technology industry, but not widely beyond. She has led strategically important divisions of the company as it has shifted to services and products with high profit margins, like software that mines vast troves of corporate and online data for sales and cost-saving opportunities.

The directors’ choice of Ms. Rometty, who managed a crucial merger as well as sales in fast-growing new markets, ends a competition that has been under way for years. The leading candidates were always from within the company’s executive ranks.

A leading rival to succeed Mr. Palmisano, analysts say, was Steven A. Mills, the senior vice president who led I.B.M.’s highly profitable and growing software division. But his age, analysts note, was probably an obstacle. Mr. Mills has just turned 60, the traditional retirement age for I.B.M. chief executives.

The selection of Ms. Rometty for the top job at I.B.M. will make her one of the most prominent women executives in corporate America, joining a small group of chiefs that includes Ursula Burns of Xerox, Indra Nooyi of PepsiCo, Ellen J. Kullman of DuPont and Meg Whitman of Hewlett-Packard. Gender, according to Mr. Palmisano, did not figure into Ms. Rometty’s selection.

“Ginni got it because she deserved it,” Mr. Palmisano said, using the informal first name by which she is known to friends and colleagues. “It’s got zero to do with progressive social policies,” Mr. Palmisano added.

Ms. Rometty has led the growth and development of I.B.M.’s huge services business for more than a decade. The services strategy, analysts say, is partly a marketing tactic. But, they add, it also represents a different approach to the technology business, with less emphasis on selling hardware and software products. Instead, I.B.M. puts together bundles of technology to help business streamline operations, find customers and develop new products.

“I.B.M. is selling business solutions, not just products,” said Frank Gens, chief analyst for the technology market research firm IDC. “Rometty has been at the forefront of that effort.”

Ms. Rometty, who graduated from Northwestern University with an undergraduate degree in computer science, joined I.B.M. in 1981 as a systems engineer. She quickly moved up to a series of management jobs, working with clients in industries including banking, insurance, telecommunications, manufacturing and health care.

In 2002, Ms. Rometty championed the purchase of the big business consulting firm, PricewaterhouseCoopers Consulting, for $3.5 billion.

An error has occurred. Please try again later.

You are already subscribed to this email.

The deal was made shortly after Mr. Palmisano became chief executive and it was seen as a big risk. The PricewaterhouseCoopers consultants were used to operating fairly independently, in a very different culture from the more regimented I.B.M. style of the time. The danger, analysts say, was that the business consultants would flee in droves, leaving the business a shell.

Ms. Rometty was put in charge of coordinating the work of the acquired firm’s consultants with I.B.M.’s technologists, to tailor services and software offering for specific industries. Ms. Rometty, analysts say, worked tirelessly and effectively to win over the consultants. “She did the deal, and she made it work,” Mr. Palmisano said.

“Ginni Rometty combines performance and charisma,” said George F. Colony, chairman of Forrester Research. “She orchestrated a massive charm campaign to bring the PricewaterhouseCoopers people into the fold. That was the trial by fire for her.”

In 2009, Ms. Rometty became senior vice president and group executive for sales, marketing and strategy. Part of the job is leading the I.B.M. drive to sharply increase its business in overseas growth markets, like China, India, Brazil and dozens of emerging markets, including several African nations. Such markets now account for 23 percent of I.B.M.’s revenue, up from 20 percent when she took over. It should reach 30 percent by 2015, the company projects.

The top marketing job also includes spotting opportunities to use the science coming out of I.B.M.’s labs in new products and services. In that perch, Ms. Rometty has pushed to expand the company’s fast-growing analytics unit, which blends data-mining software with services expertise. “It’s not about capturing markets, it’s about making new markets,” Ms. Rometty said in a brief interview after the announcement.

Mr. Palmisano succeeded Louis V. Gerstner Jr., an outsider who became chief executive in 1993, and led a historic turnaround of I.B.M., an endangered corporate icon. Mr. Palmisano inherited a company that had returned to health, but he set about transforming it once again. Under Mr. Palmisano, I.B.M. sold its personal computer and some other hardware lines, and focused increasingly on services and software. I.B.M. sells mainly to business and governments, leaving consumer technology to others.

His strategy for driving the company behind big services projects to use technology to tackle big business and societal challenges, like energy, traffic and water management, had a catchy title, “Smarter Planet.” But such grand themes were initially met with skepticism on Wall Street. “The challenge is that you have to bring investors with you,” Mr. Palmisano explained.

That led to the development of a “financial roadmap,” setting out five-year plans for its growth initiatives and profit targets for the company as a whole. This year, I.B.M. is completing the first five-year roadmap, with the numbers running ahead of the plan, despite the 2007-2009 recession.

I.B.M.’s profits have increased sharply since Mr. Palmisano took over, and its stock price climbed. Earlier this year, I.B.M. passed Microsoft to become the second most valuable technology company, measured by market capitalization, trailing only Apple, the consumer technology powerhouse.

I.B.M. must steadily evolve, Ms. Rometty said, but she does not anticipate changing course abruptly. “What you’ll see is an unfolding of the strategy we have in place,” Ms. Rometty said, noting that she had a hand in creating it.

A version of this article appears in print on October 26, 2011, on Page B1 of the New York edition with the headline: I.B.M. Names A New Chief. Order Reprints|Today's Paper|Subscribe