Tesla unveiled a new all-electric SUV on Thursday night that the automaker hopes will win over consumers looking for an all-electric alternative in the most popular segment of the auto market.

Cheers from a hangar-packed crowd of Tesla customers, employees and members of the media welcomed a blue Model Y as it rolled out onto a stage next to the automaker's other models.

"It has the functionality of an SUV, but it will ride like a sports car," CEO Elon Musk told the crowd. "This thing will be really tight on corners and we expect it will be the safest midsize SUV in the world by far."

The Model Y seats seven and has a panoramic glass roof and a 15-inch (38-centimeter) touchscreen interface for accessing all the car's controls.

The all-electric, mid-size SUV will start at $39,000 for the standard range version, which the company said can go 230 miles (370 kilometers) on a single charge. The long-range model, which starts at $47,000, has a range of up to 300 miles (483 kilometers) on a single charge - less range than the Model 3.

A dual-motor, all-wheel drive version of the Model Y starts at $51,000 while the performance version of the car, which boasts acceleration of 0-60 mph (97 kph) in as little as 3.5 seconds and a top speed of up to 150 mph (241 kph), starts at $60,000.

The Model Y may be Tesla's most important product yet as it attempts to expand into the mainstream and generate enough cash to repay massive debts that threaten to topple the Palo Alto, California, company.

Tesla got a huge boost toward ensuring its survival with the 2017 debut of its Model 3 sedan, but an SUV could have even more mass appeal, given how popular SUVs have become in the U.S., Europe and Canada.

The U.S. market share for SUVs, crossovers, vans and pickup trucks stood at 69 percent in January, up from just 48.5 percent a decade ago, according to the research firm IHS Markit.

But most SUVs still run on gasoline, leaving Tesla to cater to consumers looking for an all-electric alternative. The Model Y's main competition in this still-nascent market is likely to be the Mercedes-Benz EQC, and to a lesser extent, the Jaguar I-Pace, according to the research firm LMC Automotive.

"This could be Tesla's most profitable vehicle, with the giant asterisk that the company doesn't do some of the dumb things it has in the past," said Gartner analyst Mike Ramsey.

Many of Tesla's past follies have been tied to Musk's penchants for making grandiose promises that the company hasn't been able to keep in terms of production, delivery and execution.

Production of the Model 3 quickly fell behind schedule as Tesla struggled to come up with adequate manufacturing capacity and it took much longer than anticipated to lower the sedan's starting price to the $35,000 level that Musk had been promoting. Instead, the lowest priced version of the Model 3 had been selling for $43,000 until a couple weeks ago when Tesla reached the promised price point by laying off thousands of workers and imposing other cost-cutting measures.

Overseeing the ramp-up of Model 3's production nearly drove Musk to exhaustion last year, a factor that may have contributed to a mystifying pattern of behavior that included tweeting about having lined up the financing for a potential buyout of Tesla. That misleading statement jeopardized his job and resulted in a $40 million settlement with stock market regulators.

Musk alluded to the troubled production of the Model 3 during his remarks to the crowd Thursday night.

"Because of extreme challenges with the Model 3 production, we have to basically allocate all resources to Model 3 production, because otherwise we're going to die," Musk said with a chuckle, eliciting laughs from the crowd.

He then added: "2018 probably felt like aging five years in one. It was really intense."

Tesla expects to deliver the performance, long range, rear-wheel drive and dual-motor, all-wheel drive versions of the Model Y in the fall of 2020. The standard version of the Model Y is expected to roll out in the spring of 2021.

As with all electric vehicles, the distance that the Model Y can cover on a fully charged battery is likely to be one of its key selling points - or downsides. Tesla pegged the Model Y's range at up to 300 miles compared to 325 miles for the Model 3.

Tesla is hoping there will pent-up demand for the Model Y, nearly four years after Musk first began touting the company's plans to make an SUV. Bringing in early down payments for the vehicles would help Tesla generate the cash it needs to repay nearly $1.7 billion in loans that come due within the next 16 months.

The company began the year with about $11 billion in debt and $3.7 billion in cash, but those figures presumably fell recently when it repaid about $920 million in bonds.

Another $566 million in notes are scheduled to be repaid this November followed a $1.1 billion credit line in June 2020.

Consumers who plop down their deposits for the Model Y may have to cross their fingers for their vehicles to be delivered on schedule.

Tesla's recurring production and delivery problems have resulted in consumers having to wait longer than they were originally told. Musk now says Tesla has worked out those issues.

Ramsey, though, remains skeptical about whether the company will have adequate manufacturing capacity for the Model Y. He expects the Model Y's journey to the mass market to provide another wild ride for the company, its investors and customers.

"Until Elon is gone, Tesla is going to be a crazy company that occasionally makes breathtaking products," Ramsey predicted.

___

Liedtke contributed to this report from San Francisco.

Copyright Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.