SAN FRANCISCO — In 1997, Apple was on the ropes. The Silicon Valley pioneer was being decimated by Microsoft and its many partners in the personal-computer market. It had just cut a third of its work force, and it was about 90 days from going broke, Apple’s late co-founder, Steve Jobs, later said.
On Thursday, Apple became worth more than $1 trillion when its shares climbed 3 percent to end the day at $207.39, two days after the company announced the latest in a series of remarkably profitable quarters.
Apple’s ascent from the brink of bankruptcy to the world’s most valuable public company has been a business tour de force, marked by rapid innovation, a series of smash-hit products and the creation of a sophisticated, globe-spanning supply chain that keeps costs down while producing enormous volumes of cutting-edge devices.
That ascent has also been marked by controversy, tragedy and challenges. Apple’s aggressive use of outside manufacturers in China, for example, has led to criticism that it is taking advantage of poorly paid workers in other countries and robbing Americans of good manufacturing jobs. The company faces numerous questions about how it can continue to grow.
And Mr. Jobs, admired for his dazzling product demonstrations and feared for his blunt management style, was arguably the tech industry’s most famous figure when he died in 2011 after a battle with pancreatic cancer. He was 56.
“Could anyone really imagine this back then?” said Apple’s former software chief Avie Tevanian, who joined Apple in 1997. “We hoped to make the company very successful and very valuable. But to think it would get to where it was today? Of course not. And Steve wouldn’t have thought that, either.”
Apple was founded in 1976 with the mission of making computers — then bulky, complicated industrial machines — cheap, small and simple so they could become a mass-market product. By the 1980s, the company was one of the world’s best-known brands.
But in 1985, Mr. Jobs was ousted in a boardroom coup. In the following years, the company was increasingly outgunned and outmaneuvered in the personal-computer market it helped invent.
Apple, hamstrung by a lack of new ideas, failed products and leadership turmoil, had lost its way.
Fred Anderson, Apple’s former chief financial officer, said that shortly after he joined in 1996, he initiated a $661 million bond offering to keep the company afloat. “I didn’t know how bad it was until I started digging in,” he said.
By the end of that year, Apple had lost $867 million and the total value of its shares was less than $3 billion.
The ailing company decided to take a gamble. It bought Next, a tech firm run by Mr. Jobs, for $400 million. Mr. Jobs, still synonymous with the Apple brand, would return to the company he had founded.
“It was on the rocks,” Mr. Jobs later recalled. “It was much worse than I thought.”
Mr. Jobs slashed 70 percent of Apple’s product plans, commissioned the company’s “Think Different” ad campaign and reimagined how it put its products together.
“We’re trying to get back to the basics,” a weary Mr. Jobs said in a 1997 internal meeting with staff. A video of the meeting posted online later showed him sporting shorts and sandals. “The question now is not: Can we turn around Apple? I think that’s the booby prize. I think it’s: Can we make Apple really great again?”
The focus on simplicity became a hallmark of Apple, from the way Mr. Jobs dressed — jeans and black mock turtlenecks became his uniform of sorts — to the way his products operated to the eventual look of his company’s retail stores.
In 1998, Apple introduced the iMac G3, a round, colorful, all-in-one desktop computer. It became a hit. Apple had its swagger back.
The company’s revitalization was confirmed with the iPod, the portable music player that almost immediately changed consumers’ relationship with music. The iPod, which debuted in 2001 and went on to sell more than 400 million units, showed that Apple wasn’t just a computer company. The device was paired with iTunes, the company’s music store, which would help upend the recording industry. And it portended a bigger product to come.
“The iPod was a step — a really important one,” said Ken Kocienda, a longtime Apple software engineer who will soon release a book about Apple called “Creative Selection.” “But the iPhone was really the definitive answer to the question: What comes next after personal computers?”
The iPhone transformed the way society interacts with technology, and quickly became one of the best-selling products ever: More than 1.4 billion have been sold since it was introduced in 2007.
No product or decision was remotely as instrumental to Apple’s rise to $1 trillion as the iPhone. When Mr. Jobs first announced the iPhone, Apple was worth $73.4 billion.
Former employees and analysts said that while Mr. Jobs deserved credit for overseeing the reinvention of the company’s vision and its innovation, his successor, Timothy D. Cook, had also played a crucial role in the turnaround by overhauling the way Apple built its products.
Mr. Cook, as chief operating officer under Mr. Jobs, remade Apple’s distribution pipeline to heavily rely on contract manufacturers in China, which gave it the flexibility, cost savings and scale to build such a big business.
As chief executive, Mr. Cook has also overseen most of the rise in Apple’s value. (The total value of the company’s shares was $346 billion when he took the helm in August 2011.) Mr. Cook has been a steady, if unflashy, hand as chief executive, building the iPhone into a huge business, including sales of accessories and services off it.
Now, with Apple reaching the $1 trillion milestone and the iPhone turning 11 years old, pressure is likely to increase for the company to develop a hit new product.
There have been other popular devices, like the iPad, the Apple Watch and routinely updated versions of Apple’s personal computers. But none have come close to the impact of the iPhone.
The company also has been linked to self-driving cars and augmented reality glasses, but Apple would face major technical and even social hurdles with either product.
There are other challenges. Apple depends on China for a significant amount of its sales, as well as its manufacturing. It could be caught in the middle of the trade war brewing between China and the United States.
“It’s been one of the most miraculous corporate turnarounds in business history,” said Tim Bajarin, a technology analyst and consultant who has tracked the company for nearly 40 years. “The question going forward is: Can Apple continue to innovate?”