NEW YORK — Warren Buffett said his Berkshire Hathaway Inc. has invested $10.7 billion in International Business Machines Corp. this year, a major reversal for the billionaire investor who has famously avoided technology stocks.

Berkshire purchased 64 million shares, or about 5.4% of the outstanding stock, beginning in March and building the stake throughout the year, Buffett said in an interview Monday on CNBC Monday. Berkshire's purchases come as IBM's stock has repeatedly set all-time highs. Based on Friday's close, Berkshire's stake would be valued at about $12 billion.

IBM shares rose 1.1% to $189.36 in premarket trading. IBM's all-time high is $190.53, reached on Oct. 31.

Berkshire had been given permission by securities regulators to keep the purchases secret for several months. Now Berkshire is finished acquiring shares, and details about the investment will be disclosed in a regulatory filing, likely after the close of trading Monday, Buffett said.

The new stake in the company marks a massive change for Buffett, who has famously eschewed tech stocks despite a long, close friendship with Microsoft Corp. co-founder Bill Gates, who sits on Berkshire's board. Buffett said he had gained added insight on IBM in reviewing the company's regulatory filings, and said he had been "hit between the eyes" by the advantages the company enjoys in finding and keeping clients.

In addition, he had discussed the company with the information technology departments at several of Berkshire's subsidiary companies, and drawn upon his own expertise from decades ago, when he had tried to market competing technology to companies, only to be told that "no one had ever gotten fired" for selecting IBM as their supplier.

"It's a company that helps IT departments do their job better," Buffett said. "It is a big deal for a big company to change auditors, change law firms," or for IT departments to move away from using IBM, he said. "There is a lot of continuity to it."

As the company retains existing clients, they are growing substantially around the globe, he said, and has reported double-digit growth in 40 countries.

IBM shares are up 28% this year and have been the best performer on the Dow Jones Industrial Average. Berkshire now holds shares or preferred stock in roughly 10 of the 30 Dow stocks, though that figure could change when the company gives the full update of its holdings later Monday.

Buffett said he admired IBM in part because they have laid out clear long-term goals and then met them.

"They've done an incredible job" in laying out a roadmap for the future, Buffett said on CNBC. "It was something I should have spotted years earlier," he said.

Buffett said executives at IBM were unaware of the purchases, and that he had never spoken to the company's outgoing chief executive officer, Samuel J. Palmisano. An IBM spokesperson declined to comment on Buffett's revelation.

IBM has benefited in recent years from a push toward higher-margin businesses, such as data-analysis services, but worries have emerged that the weak global economy is having a negative impact on tech spending, particularly by governments.

In addition, IBM is undergoing a leadership change, as Virginia M. Rometty will replace Palmisano as chief executive on Jan. 1. Palmisano won credit for making some wrenching decisions, like dumping IBM's PC business in the middle of the past decade, and for using a string of acquisitions to boost the company's exposure to more profitable services and software businesses.

Rometty has said she doesn't plan any near-term changes to IBM's strategy, business model or its financial plan, which aims to double its earnings per share between 2010 and 2015. The plan also anticipates revenue from growth markets approaching 30% of total revenue and the company will invest $20 billion in acquisitions by 2015.

In addition to IBM, Buffett also said the company had added to shares of Wells Fargo & Co. in the third quarter.