In July of 1997, five months after Apple bought NeXT and bought him back into the fold, Steve Jobs became Apple's de facto interim CEO, kicking off the most successful comeback by an executive in the history of American business.

The departure and return of Steve Jobs from Apple is as central to Apple history as just about anything else. It's been pored over in numerous books, two different feature films and more than one documentary. It got ugly at times, but things happening the way they did helped make the many Apple triumphs of the last two decades possible.

A Separation

The story is well-known: Jobs cofounded Apple in 1976, although he was never the company's CEO during his first stint with the company. Apple was led by a succession of chief executives, starting with Michael Scott and Mike Markkula, until Jobs recruited John Sculley from PepsiCo in 1983.

Jobs and Sculley soon clashed, and following a failed coup, Jobs was demoted, leading to his departure in 1985.

Steve Jobs went on to found NeXT Computer in 1988, as Apple's struggles continued throughout the early to mid-1990s. In December of 1996, Apple agreed to acquire NeXT for about $400 million, with the intention of basing its next operating system around NeXT's NeXTStep.

With the NeXT deal, Jobs returned to Apple as an "adviser," reporting directly to CEO Gil Amelio, who had been named CEO of Apple in early 1996.

Amelio, the son of Italian immigrants, holds a Ph.D. in physics and had worked as a researcher. He was CEO of National Semiconductor and served on Apple's board for two years before he took over the CEO chair.

"This is a complementary arrangement, and the pieces fit together better than any other alternative we looked at, and it will launch a new round of technology," Amelio said at the time of the Apple/NeXT deal announcement.

Jobs once told a story in a Q&A about his decision to return.

"When I was trying to decide whether to come back to Apple or not I struggled. I talked to a lot of people and got a lot of opinions," Jobs said in 2001, as reported by Apple intern-turned-blogger Jonathan Berger. "And then there I was, late one night, struggling with this and I called up a friend of mine at 2am. I said, should I come back, should I not?' and the friend replied, Steve, look. I don't give a f*ck about Apple. Just make up your mind' and hung up. And it was in that moment that I realized I truly cared about Apple."

It was speculated for years who the friend on the phone had been, but Jobs admitted to biographer Walter Isaacson that it was Intel's Andy Grove.

A bad few months

Jobs' return to the company was followed by a series of bad events for Apple. Macworld, held in San Francisco shortly after the announcement of the NeXT acquisition, was a disaster, plagued by a malfunctioning TelePrompter and Amelio forgetting to introduce guest of honor Muhammad Ali.

In February, Apple announced its worst quarter ever, leading to the layoff of 3,000 employees. Meanwhile, various employees either from NeXT or otherwise loyal to Jobs were promoted throughout the company.

There were also a pair of blows struck against Amelio that spring: A failed hostile takeover attempt by Oracle's Larry Ellison, and the selling of 1.5 million shares of Apple stock. It later came to light that Jobs was supportive of Ellison's move, and that it was Jobs who had sold that stock.

Exit Amelio

Throughout all of this, Amelio lost the confidence of his board, and over the July 4 holiday, Apple Chairman Ed Woolard informed Amelio that he was out as CEO. Officially he resigned, on July 9, 1997.

Amelio was CEO of Apple for exactly 500 days; he later wrote a memoir, published in 1999, called On the Firing Line: My 500 Days at Apple. Amelio was one of multiple Apple CEOs to leave involuntarily, but was also the last to do so.

Following Amelio's departure, Jobs was not immediately named CEO or even interim CEO; in fact, he reportedly asked not to be considered for the top job at the time and was even put in charge of finding a permanent replacement.

But it soon became clear that Jobs was in charge, and in September of 1997, he was officially named interim CEO. He kept the interim tag for more than two years, finally introducing himself as permanent CEO at Macworld Expo in 2000.

Actor Kevin Dunn played Amelio in "Jobs," the Ashton Kutcher Steve Jobs movie; there was no Amelio character in the Michael Fassbender film.

Return, and rise

Once in charge, Jobs moved quickly. He cancelled such products released during his exile, such as the Newton and Cyberdog. That August, he announced a shocking deal with Microsoft, in which Bill Gates' company agreed to invest $150 million in Apple.

Jonny Ive was promoted to Senior Vice President of Industrial Design, helping bring about an unprecedented run of innovation and success. The iMac arrived in 1998, the iPod and Apple Store in 2001, the iPhone in 2007, the App Store in 2008 and the iPad in 2010.

Apple, which had been in significant financial trouble at the time of Amelio's departure, soon became hugely profitable, and is now the most valuable company in the world.

Jobs remained CEO until he resigned for health reasons in August of 2011 and named Tim Cook his successor. Jobs passed away two months later, on Oct. 5, 2011.

The legacy

No, not everything Steve Jobs did at Apple, even during his second run, was an unalloyed success. There were scandals and controversies, from a bonus-backdating case to questions about the company's environmental record to