International Business Machines Corp. said its second-quarter profit surged 65 percent, better than expected, as it rode the success of its powerful technology services division, as well as strong computer sales.

The world's largest technology company said it earned $2.39 billion, or $1.28 a share, in the three months ended June 30, up from $1.45 billion, or 75 cents a share, in the same quarter a year ago.

The profit included an after-tax gain of $700 million from IBM's sale of its Global Network business to AT&T Corp., as well as other nonrecurring actions.

Excluding these items, IBM earned 91 cents per share. A consensus survey of analysts polled by First Call Corp. predicted Armonk, N.Y.-based IBM would earn 88 cents a share.

Revenue rose 16 percent in the quarter, to $21.9 billion from $18.82 billion in the same period last year.

"In summary, our results were strong worldwide," IBM chief executive Louis V. Gerstner said in a statement. He reiterated an earlier remark that IBM was focused on three key areas, all of which have performed well: software, technology services and computer chips and storage equipment.

"What's most impressive is that IBM is tracking exactly to its strategy," said Daniel Kunstler, an analyst with J.P. Morgan Securities in San Francisco. The company is saying what it will focus on, and is excelling in those areas, Kunstler said. It is particularly "knocking the cover off the ball in services," Kunstler said.

The company's global services division's revenue increased 19 percent, excluding maintenance, to $6.7 billion. IBM is the largest computer services firm in the world.

The company said it signed $9.5 billion in services contracts in the quarter, concluding with a total contract backlog of $55.2 billion.

"It was an awesome quarter," said Megan Graham-Hackett, an analyst for Standard & Poor's Equity Group in New York. Graham-Hackett hailed IBM's "unique capabilities in a rapidly growing space," referring to its proficiency in technology services at a time when businesses are trying to fiercely build their Internet commerce capabilities.

Indeed, IBM has benefited by

its positioning as the technical epicenter of the surge in electronic transactions in the marketplace.

In May, Gerstner incited a bullish frenzy around his company when he said IBM was reaping $20 billion a year -- nearly a quarter of its total -- from Internet and network-related businesses. He said IBM is generating more revenue than the top 25 Internet companies combined.

"We agree that IBM wins as corporations stampede to the Net," Merrill Lynch vice president Steven Milunovich wrote in a report this month. "E-business is growing 20 percent and 60 percent of the revenue will be services," he said.

IBM also said sales of computer hardware increased by 22 percent, to 9.4 billion. Software sales rose 9 percent to $3.1 billion.

In the six months ended June 30, IBM said, its profit rose 55 percent to $3.86 billion, or $2.05 a share, from $2.49 billion, or $1.28 a share. Revenue grew 16 percent to $42.22 billion from $36.44 billion.

IBM announced its results after trading had ended yesterday. Its shares closed down $1.625, to $134.625. Since the beginning of this year, IBM's shares have risen 46 percent.