When a company is on the brink of failure, it will often file for Chapter 11 bankruptcy protection. This allows the company to undergo a reorganization of its business affairs, debts and assets. Many companies that go bankrupt are able to settle with their creditors and then close up shop permanently.

Enron, WorldCom and Lehman Brothers are just some well-known examples of bankrupt companies that never came back. On the other hand, some companies have managed to re-emerge from bankruptcy in better shape than before they went bust. (For more, see: What You Need to Know About Bankruptcy.

Below is a list of some of the most spectacular comebacks from companies that either went bankrupt or came nail-bitingly close to doing so.

Apple 

Hard to believe that one of the world's largest companies by market capitalization was once in dire straits. While never actually filing for bankruptcy, Apple (AAPL) was on the verge of going bust in 1997. At the last minute, arch-rival Microsoft (MSFT) swooped in with a $150 million investment and saved the company. People have speculated that Microsoft only did so because it was worried that regulators would regard it as a monopoly without the competition from Apple in the marketplace. 

General Motors 

Following the financial crisis of 2008, General Motors (GM), once the largest automobile manufacturer in the world, filed for bankruptcy and was ultimately bailed out by the federal government. In December 2013, the U.S. Department of the Treasury fully exited its investment in GM, recovering a total of $39.7 billion from its original investment of $51 billion.

Ally Financial

GMAC, now Ally Financial (ALLY), was the auto-financing arm of General Motors, extending credit to purchasers of its cars. The bank was bailed out alongside its parent to the tune of $17.2 billion by the U.S. Treasury Department. The company has emerged as a profitable business with a market capitalization of $5.6 billion as of April 2020.

Chrysler 

General Motors wasn't the only car maker to go bust during the Great Recession. American car manufacturer Chrysler filed for bankruptcy in April 2009, about one month before GM. Chrysler took $12.5 billion in government assistance, of which it repaid the U.S. Treasury $11.2 billion. European car maker Fiat (FCAU) purchased Chrysler in January 2014.

Marvel Entertainment

With blockbuster movies such as Spiderman, The Avengers, and Guardians of the Galaxy, it is surprising to note that Marvel filed for bankruptcy in 1996. This was before the company got into the movie-making business when it focused primarily on comic books. Today, the company's properties are worth billions of dollars with millions of fans around the world and it is now a subsidiary of Disney (DIS).

Six Flags 

Theme park operator and amusement company Six Flags (SIX) has 26 theme and water parks throughout North America, home to some of the world's biggest and fastest roller coasters. In 2009, however, the company declared bankruptcy after racking up more than $2.7 billion in debt which it could not pay back. Six Flags reorganized and emerged from bankruptcy in 2010.

Texaco

Texaco, now part of Chevron (CVX), once dominated the oil industry. In 1984, Texaco agreed to buy Getty Oil, setting off a three-year legal drama that would end with Texaco owing billions to rival Pennzoil. It all started when Getty Oil and Pennzoil agreed to a merger. Texaco swooped in with a larger offer, snatching Getty Oil away and leaving Pennzoil fuming at the altar. Pennzoil sued for damages. A jury agreed and awarded Pennzoil $11 billion. Texaco offered to settle for $2 billion, but Pennzoil refused. This forced Texaco to seek Chapter 11 bankruptcy protection. It emerged from bankruptcy in December 1987 when Pennzoil agreed to accept a $3 billion settlement. 

Sbarro

Sbarro operates and franchises more than 800 fast-food style pizza and Italian-food restaurants worldwide. Sbarro went bankrupt twice: first through a Chapter 11 bankruptcy reorganization in 2011 and then again in 2014. The company has re-emerged with the help of a collaboration of private equity firms to transform the company's image to a more fast-casual style, rather than its previous kiosk or food counter concept.

The Bottom Line

Bankruptcy is often the end of a company, but it doesn't have to be in every case. The companies in the list above have re-emerged from bankruptcy to become profitable and successful. As an investor, it is useful to note that bankruptcy isn't always the end of the line for a company and that through buying shares of companies as they emerge from bankruptcy, reorganization can be a potential source of excess returns.