At last count, Berkshire Hathaway (BRK.A 0.99%) (BRK.B 0.91%) had a $2.1 billion stake in Goldman Sachs (GS 3.30%), making the investment bank the 11th largest position in its nearly $110 billion portfolio.

But have you ever wondered why Goldman Sachs is one of Warren Buffett's biggest stock holdings?

The answer is a long and winding road, but it's one Buffett was assuredly happy to travel.

The vote of confidence
Amid the market turmoil in fall 2008, Berkshire Hathaway and Goldman Sachs agreed to a $5 billion deal that CNBC called a "vote of confidence" in the acclaimed investment bank after the collapse of Lehman Brothers.

Goldman Sachs Tower. Image Source: Flickr/saebaryo.

"We are pleased that given our long-standing relationship, Warren Buffett, arguably the world's most admired and successful investor, has decided to make such a significant investment in Goldman Sachs," Goldman Sachs CEO Lloyd Blankfein said at the time. 

The agreement gave Berkshire Hathaway a $5 billion stake in preferred stock of Goldman Sachs that paid a 10% annual dividend. Berkshire also received warrants to buy an additional $5 billion worth of Goldman Sachs common stock within a five-year window at a price of $115 per share.

"Goldman Sachs is an exceptional institution," Buffett stated then. "It has an unrivaled global franchise, a proven and deep management team and the intellectual and financial capital to continue its track record of outperformance."

The quick redemption
While Buffett and Berkshire Hathaway undoubtedly enjoyed that $500 million annual dividend from the preferred stake in Goldman, it did not last long. In his 2010 letter to Berkshire Hathaway shareholders, Buffett noted that "Goldman Sachs has the right to call our preferred on 30 days notice, but has been held back by the Federal Reserve (bless it!), which unfortunately will likely give Goldman the green light before long."

He was right. Just 10 days after the letter was published, Goldman received approval from the Federal Reserve to redeem its preferred stock, which it quickly did in April 2011.

While this meant Berkshire would no longer receive the sizable dividend, it wasn't all bad news, as the redemption allowed Buffett's company to receive a one-time $1.25 billion investment gain in the second quarter of 2011.

Warren Buffett. Image Source: The Motley Fool.

Not the end
Of course, preferred stock isn't the same as common stock, and the warrants that allowed Buffett to purchase $5 billion of common stock at $115 share remained outstanding.

However, in March 2013, Goldman and Berkshire came to an agreement that would deliver 43.5 million shares of Goldman Sachs to Berkshire based on the stock's average closing price in the 10 trading days before Oct. 1, 2010.

This enabled Buffett to hang on to the $5 billion in cash that would have been required to buy the stock and instead receive the profits he otherwise would have made -- the total difference between the average share price during those 10 days before Oct. 1 and the previously agreed to $115 -- in the form of Goldman Sachs stock.

In the end, Buffett received a little over $2 billion worth of Goldman Sachs common stock at a cost of $750 million on the Berkshire books. And that's how Goldman became one of Buffett's biggest stock holdings.