The heir apparent to business icon Warren Buffett's investment firm has quit under an oily cloud.

David Sokol, long considered the most likely candidate to succeed the billionaire investor as the head of Buffett's Berkshire Hathaway, resigned after purchasing shares in an oil company that he suggested Buffett should buy.

But Buffett moved to scotch rumours that the purchase had anything to do with the resignation. In a statement Buffett said Sokol had told him he owned shares in the chemical company, Lubrizol Corp, when they first discussed the deal in January. Buffett said that neither Sokol nor he felt that "his Lubrizol purchases were in any way unlawful" and that they were not a factor in his decision to resign.

"Dave brought the idea for purchasing Lubrizol to me on either 14 or 15 January. Initially, I was unimpressed, but after his report of a 25 January talk with its CEO, James Hambrick, I quickly warmed to the idea," Buffett said in a statement. "Though the offer to purchase was entirely my decision, supported by Berkshire's board on 13 March, it would not have occurred without Dave's early efforts."

According to Buffett, Sokol purchased 2,300 shares of Lubrizol on 14 December, which he then sold on 21 December. In early January Sokol bought 96,060 shares with a price limit set at $104 (£64) per share, Buffett said. Berkshire agreed to acquire Lubrizol for $9bn, or $135 a share, on March 14. Sokol's stake potentially earned him a profit of about $3m in less than three months.

Buffett said Sokol told him "that they were not a factor in his decision to resign." Sokol's resignation "came as a surprise to me," said Buffett. "Dave's contributions have been extraordinary," he said.

In an interview with The Wall Street Journal, Sokol said his resignation has "had absolutely nothing to do" with Lubrizol. He admitted "it would look bad 60 days later" if his stake in Lubrizol was disclosed in public filings and Berkshire hadn't said anything about it.

"We wanted it all out," he said. Part of Sokol's resignation letter was contained in the statement.

"As I have mentioned to you in the past, it is my goal to utilise the time remaining in my career to invest my family's resources in such a way as to create enduring equity value and hopefully an enterprise which will provide opportunity for my descendants and funding for my philanthropic interests," he said.

Sokol's resignation is a major blow to Buffett. The 80-year-old investor is known as the Sage of Omaha and is arguably the world's most respected businessman. While he has said he has no plans to step aside, the race to succeed him has been keenly watched and Sokol, 54, who helped run several Berkshire subsidiaries has been seen as the front runner.

The resignation comes as Buffett prepares for his annual meeting in his home town of Omaha next month. Often called the Woodstock of capitalism, thousands of shareholders attend and Buffett is bound to be grilled on his succession plans and the reasons for Sokol's resignation.