NEW YORK – Lyft’s shares soared as the company went public Friday, giving investors their first chance to bet on the future of the ride-hailing industry.

The stock opened at $87.24, up 21 percent from its offering price of $72. Lyft won the race with its much larger rival Uber to go public, and the debut marked the first time most people who have used their smartphone to summon a car through Lyft or Uber can take their chances on whether the ride-hailing phenomenon will continue to transform transportation and become a money maker.

Lyft raised its target price from its initial range of $62 to $68 over the course of the last week as investors clamored to get in on the action, despite the company’s history of losses.

In a sign of how ride-hailing giant Lyft has changed the way we think of transportation, Lyft executives celebrated the company’s stock market debut from the inside of a former car dealership they plan to convert into a center for their company’s drivers.

Investor: Don’t get caught up in hype around Lyft, Pinterest, other tech IPOs

Co-founders Logan Green and John Zimmer talked about their early vision of the company and their commitment to providing alternatives to individual car ownership.

“In 2012 we launched Lyft, and pioneered the idea of on-demand peer-to-peer ride-sharing,” said Logan Green, CEO and co-founder, at an event in Los Angeles Friday. “In those early days we were told we were crazy to think people would ride in each others’ personal vehicles. And now, after more than 1 billion rides, we’re able to look forward to a world we’ve long imagined, designed less for cars and more for people.”

Lyft also said it ended up selling 32.5 million shares in the offering, above the nearly 31 million that it had targeted in its regulatory filings leading up to Thursday evening’s pricing.

“Without question, investors are looking beyond operating losses to the potential upside,” in the ride-hailing industry, said Alejandro Ortiz, an analyst for SharesPost.

The IPO raised more than $2 billion to use in its heated competition with Uber to woo riders. Uber is expected to make an even bigger splash when it completes its IPO later this year.

Investors embraced Lyft despite an uninterrupted history of losses totaling nearly $3 billion since its 2012 inception on the premise that its growing popularity will pay off in the long run.

“Lyft has been successful against big odds because we have always prioritized the long term sustainable growth of both our community and our company,” said John Zimmer, president and co-founder. “Business results and societal impact are not only linked, but they can and do feed off each other. We know the road ahead comes with both massive opportunities and genuine challenges.”

Lyft said Friday it will invest $50 million annually, or 1 percent of profits — whichever is greater — in transportation initiatives in cities. The investments will include free or discounted rides for medical patients and low-income seniors and developing infrastructure for bikes, scooters and transit.

As $23B IPO nears, Lyft faces a long ride before turning a profit

The IPO represents a watershed moment for ride hailing, an industry hatched from the rise of smartphones. Now that both Lyft and Uber have made it easy to summon a ride on a mobile app, more people are already starting to wonder if owning their own cars will make sense in the future.

Lyft has been gaining ground on Uber in the past two years, which enabled it to double its revenue last year to $2.2 billion — the kind of growth that tends to wow investors.

The company’s U.S. market share has expanded from 22 percent in 2016 to 39 percent last year as Uber slogged through revelations about rampant internal sexual harassment claims , allegations that it stole self-driving technology and other mortifying issues, prompting a consumer backlash.

Meanwhile, Lyft parlayed a warm and fuzzy image that it used to cultivate by adorning drivers’ cars with a fluffy pink mustache to position its brand as the more socially responsible of the two ride-hailing rivals.

Despite Lyft’s recent inroad, there is still no guarantee the company will become profitable — a risk flagged in its own regulatory filings leading up to the IPO. Developing autonomous vehicles is key to reducing driver costs, and Lyft is behind competitors such as Google spin-off Waymo, which has begun testing a ride-hailing service using its robotic minivans in the Phoenix area.

Cutting costs by reducing pay to drivers also could prove difficult, a challenge underscored by protests staged earlier this week over wages that drivers complain already are too low.

Even so, Lyft’s revenue per ride has been increasing, so some analysts see the company as headed in the right direction.

Lyft’s co-founders Logan Green and John Zimmer have structured the shares so that together they will hold 49 percent of the voting power, enough to substantially influence major decisions.

Lyft has focused on its mission of getting people to give up their personal cars in favor of ride-hailing, shared bikes and scooters, and has remained in North America. By contrast, Uber has expanded overseas and recently bought Careem, a major rival in the Middle East, while experimenting with food delivery, boats and freight operations.

It’s become increasingly common for unprofitable tech companies to go public, and the percentage of money-losing tech companies that entered the market in 2018 rivals 2000, when the dot-com bubble burst, according to data from Jay Ritter, finance professor at the University of Florida. Some, like Amazon, which took several years to turn a profit after its IPO turned into great bets for early investors.