This story was updated at 4:15 p.m. EDT.

Shares of Apple Inc. rallied following news that Warren Buffett's Berkshire Hathaway has purchased a new stake in the technology giant. Apple's stock price closed Monday's trading session up 4 percent at $94 and helped the broader market to rally.

Berkshire held 9.81 million Apple shares worth $1.07 billion as of March 31, according to a filing with the U.S. Securities and Exchange Commission detailing the company's U.S.-listed stock holdings. Berkshire made its investment in the first quarter, before the iPhone maker in April reported its first quarterly revenue decline in 13 years.

It is not clear who made the investment, Buffett or one of his portfolio managers, Todd Combs and Ted Weschler, who each invest about $9 billion. Buffett has said he typically makes Berkshire's multibillion-dollar investments, while Combs and Weschler make smaller wagers.

Separately, Berkshire boosted its shares of International Business Machines Corp. to 81.2 million shares, said.

Buffett’s Berkshire has traditionally shunned investments in the technology sector, apart from a stake in IBM. Buffett has long said he does not understand the tech sector well enough, preferring investments in insurance companies, industrial names and household names such as Coca-Cola and American Express.

The investment in Apple may have been made with money from the sale of AT&T Inc. stock. Berkshire held $1.6 billion of AT&T at year's end but listed no investment in the phone company in Monday's filing.

Apple’s stock price has fallen in recent weeks amid concerns about its product pipeline. Late last month, billionaire activist investor Carl Icahn said he had sold his entire stake in Apple, citing the risk of China's influence on the stock.

Apple’s recent $1 billion investment in Chinese ride-sharing company Didi Chuxing intensifies a race to acquire technology, talent and market access in a rapidly evolving global personal transportation market.

Apple's investment comes as auto and technology industry executives and investors are placing bets that self-driving car systems, electric vehicles and ride sharing will eventually converge to allow companies to sell rides in self-driving vehicles, generating revenue day and night.

Apple CEO Tim Cook will visit India this week and meet Prime Minister Narendra Modi on the second leg of his Asian tour, two sources familiar with the matter said, as the company seeks to revive sluggish iPhone sales.

Cook's visit, which follows a trip to China, comes at a crucial time as Apple looks for new growth markets after posting its first-ever decline in iPhone sales and as India has denied it permission to sell refurbished phones — a move seen as key to appealing to price-sensitive local consumers.

The visit is Cook's first to India as the head of the U.S. technology company, one of the sources said.

It was not immediately clear whether he would discuss importing refurbished iPhones with Indian government officials.

Apart from meeting Modi, Cook will hold meetings with employees and partners, the source said, adding he would fly to India on Tuesday.

The sources declined to be identified, as the plan is not public yet. Apple declined to provide details of Cook's schedule in India.

Data from Reuters were used to report this story.