Berkshire Hathaway's just released SEC filings show that the company has taken a stake in three of the four major airline companies — American Airlines, United Continental Holdings and Delta Air Lines.

But CNBC can report exclusively that Berkshire also has taken a stake in the fourth major carrier, Southwest Airlines.

The move into airlines is a shocking reversal for Warren Buffett, who has shunned the industry for decades following a volatile investment he made in US Airways back in 1989. He bought $358 million in preferred shares of US Airways, which almost immediately dropped in value.

By 1995, Berkshire had written down the investment to $89.5 million, just 25 cents on the dollar from the original amount. Buffett actually made money on the deal in the end, to the tune of about $250 million. But the agita he suffered from the investment was enough to sour him on the entire airline industry, something he has frequently written about in his annual letters to shareholders.

He called the US Airways investment a mistake in almost every annual letter from 1989 to 1996. As early as 1989, he complained about the "kamikaze pricing tactics of certain carriers," and said of the industry, "It's impossible to be a lot smarter than your dumbest competitor." And in 2007, he laid out his argument against investing in airlines yet again.

"The worst sort of business is one that grows rapidly, requires significant capital to engender the growth, then earns little or no money. Think airlines. Here, a durable competitive advantage has proven elusive since the days of the Wright brothers. Indeed, if a farsighted capitalist had been present at Kitty Hawk, he would have done his successors a huge favor by shooting Orville down."