SAN FRANCISCO -- Apple has become the world's first publicly traded company to be valued at $1 trillion, the financial fruit of stylish technology that has redefined what we expect from our gadgets.

The milestone reached Thursday marks the latest triumph of a trend-setting company that two mavericks named Steve started in a Silicon Valley garage 42 years ago.

The achievement seemed unimaginable in 1997 when Apple teetered on the edge of bankruptcy, with its stock trading for less than $1, on a split-adjusted basis., and its market value dropping below $2 billion.

To survive, Apple brought back its once-exiled co-founder, Steve Jobs, as interim CEO and turned to its archrival Microsoft for a $150 million cash infusion to help pay its bills.

If someone had dared to buy $10,000 worth of stock at that point of desperation, the investment would be worth about $2.6 million now.

Jobs eventually introduced popular products such as the iPod and iPhone that subsequently drove Apple's rise. The stock has been surging this week as anticipation mounts for the next generation of iPhone, expected to be released in September.

Apple hit the $1 trillion mark when its shares reached $207.04 around midday in New York. They rose to an all-time high of $207.26 before falling back slightly. The shares are up around 22 per cent so far this year.

Another company, Saudi Arabian Oil Co. could eclipse Apple if it goes through with plans for an initial public offering. Saudi officials have said the IPO would value Saudi Aramco, as the company is often called, at about $2 trillion. But until the IPO is completed, Saudi Aramco's actual value remains murky.

Jobs' vision, showmanship and sense of style propelled Apple's comeback. But it might not have happened if he hadn't evolved into a more mature leader after his exit from the company in 1985. His ignominious departure came after losing a power struggle with John Sculley, a former Pepsico executive who he recruited to become Apple's CEO in 1983 -- seven years after he and his geeky friend Steve Wozniak teamed up to start the company with the administrative help of Ronald Wayne.

Jobs remained mercurial when he returned to Apple, but he had also become more thoughtful and adept at spotting talent that would help him create a revolutionary innovation factory. One of his biggest coups came in 1998 when he lured a soft-spoken Southerner, Tim Cook, away from Compaq Computer at a time when Apple's survival remained in doubt.

Cook's hiring may have been one of the best things Jobs did for Apple. In addition, that is, to shepherding a decade-long succession of iconic products that transformed Apple from a technological boutique to a cultural phenomenon and moneymaking machine.

As Jobs' top lieutenant, Cook oversaw the intricate supply chain that fed consumers' appetite for Apple's devices and then held the company together in 2004 when Jobs was stricken with a cancer that forced him to periodically step away from work -- sometimes for extended leaves of absences. Just months away from his death, Jobs officially handed off the CEO reins to Cook in August 2011.

Although Apple has yet to produce another mass-market sensation since that changing of the guard, Cook has leveraged the legacy that Jobs left behind to stunning heights. Since Cook became CEO, Apple's annual revenue has more than doubled to $229 billion while its stock has quadrupled.

More than $600 billion of Apple's current market value has been created while Cook has been CEO. That wealth creation exceeds the current market value of every publicly traded U.S. company except Amazon, Microsoft and Google's parent, Alphabet.

Photos

In this April 24, 1984 file photo, Steve Jobs, left, chairman of Apple Computers, John Sculley, center, president and CEO, and Steve Wozniak, co-founder of Apple, unveil the new Apple IIc computer in San Francisco, Calif. (AP Photo/Sal Veder, File)