Businesses fail every day, from world-beaters (like TWA and Lehman Brothers) to sexy high-fliers ( DeLorean, Enron) to Steady Eddie, old-school icons (Toys "R" Us, Sears). Sometimes, of course, market conditions simply turn Sisyphean. But often, when that boulder starts to roll backward, a leader's grit, imagination, resourcefulness, and ability to conjure a little luck can mean the difference between a brave new chapter and, well, Chapter 11. Here, four businesses that went from nearly bust to total gangbusters.

Apple: Love Thy Rival

In 1997, the creative, efficient, cash- happy heavyweight we know as Apple was on the ropes, getting slapped silly and looking for a place to plotz. The company had gone two years without turning a profit when the board finally sent CEO Gil Amelio out to orchard. Enter--or, rather, reenter--famously fired co-founder Steve Jobs, who, with the game clock winding down, had to act smart and act fast to save his com­pany. He quickly killed the Newton, a category-defining personal digital assistant that was both pricey and kludgy. But the more difficult and humbling move was seeking a strategic partnership with archrival Microsoft. "We have to let go of this notion that for Apple to win, Microsoft has to lose," Jobs explained. Microsoft invested $150 million, Apple regained its footing, and Jobs showed the world what true leadership looks like. He then made Jony Ive head designer, launched iTunes, the iPod, and the iPhone, and showed the world what domination looks like.

FedEx: Bet the Company

Say you were the CEO of a sputtering delivery company and you were down to your last $5,000. Would you a) spend it on cus­tomer acquisition, b) double down on highly targeted advertising, or c) use it to woo a white-knight investor? If you were Frederick Smith, founder and CEO of FedEx, the answer was "None of the above." In a strategy that seems more country-and- western song than boardroom tactic, Smith jumped on a flight to Las Vegas and plunked himself down at a gaming table. He had dreamed up the idea behind Federal Express while studying at Yale and founded the company in 1971 with eight planes and money in the bank. But when fuel prices spiked after the OPEC oil embargo in 1973, FedEx literally ran out of gas: According to then-COO Roger Frock, pilots used personal credit cards to gas up planes, and one courier pawned his watch to fill his van. Meanwhile, back in Sin City, Smith played his cards right and turned that $5,000 into 27 large, which bought him just enough time to bring in more funding.

Leonard Cohen: The Road From Ruin

When you peel away the music-industry stardust, Leonard Cohen's story captures the fear of many a small-business owner: You work your butt off for years while the people you trust most rob you blind. In 2005, Cohen, the '60s singer-songwriter-poet-monk behind plaintive songs like "Suzanne" and "Hallelujah," discovered that his longtime manager had been stealing from him to the tune of more than $5 million. At 71, and with only $150,000 left in his retirement fund, Cohen was gazing into the financial abyss. He mortgaged his house to pay his legal fees and composed a plan. He'd do something he hadn't done in 15 years: go on tour. After rehearsing tirelessly for three months, Cohen started small, in a not-exactly-CBGB community theater in Fredericton, New Brunswick, in Canada's Maritimes. His audiences gradually grew larger, and along the way something happened: Cohen became one of rock's trendiest tickets. He even played Glastonbury in front of 172,000 people, a feat unimagi­nable for most of his career. His back against the wall, Cohen answered with a triumph that was as much financial as it was personal.

Tesla: Running on Empty

With a net worth--at presstime--of about $180 billion, Elon Musk is the world's second-wealthiest man, and his upstart car company, Tesla, is one of its most valuable. But Musk is also a man who has walked bankruptcy's razor's edge more than once. Last November, Musk revealed how much Tesla struggled between 2017 and 2019 to manufacture the low-priced (and lower- margin) Model 3 cars, referring to this period as "production and logistics hell." With losses climbing, cash burning, and production targets proving elusive, Musk says Tesla was a mere month from floating at the top of the fishbowl. But a month seems like luxury compared with a moment in late December 2008, when Tesla was but three days from flatlining. On Christmas Eve, Musk says, he was saved by a stocking stuffer of $40 million in funding that came in at the "last hour of [the] last day possible."