Elon Musk's electric sports car company, Tesla Motors, said in September that it would build a factory in San Jose to produce its new sedan. It was a milestone for both the business and the green-tech industry on which Silicon Valley has pinned so many of its hopes.

Unfortunately, the announcement landed in the midst of a firestorm burning through the financial world.

Just days earlier, Bank of America had bought Merrill Lynch, and Lehman Bros. had declared bankruptcy. Banks pretty much stopped lending, financiers pleaded for government bailouts and the stock market tanked.

Not the best time to build a factory or launch a car.

Musk, who had been the company's chairman and one of its main investors, took over as chief executive officer and started slashing costs. The company cut staff and scaled back plans for its Model S sedan, delaying the car's introduction by at least six months.

The factory project wasn't abandoned, but Musk says it's no longer a done deal. The 5-year-old company also had hoped to go public with an initial share offering, but that too has been postponed. Rather than ramping up, the company is hunkering down.

"I hate it," said Musk. "I really didn't want to do it. But I also didn't want to be a casualty of the recession and see all that time and effort go to waste."

Few companies have been caught in so many of the currents roiling the economy this year.

The downturn hit not long after Tesla, based in San Carlos, had begun full-scale production of its first car, a luxury roadster that sells for $109,000. The privately held company nearly closed a $100 million round of financing in September to help build the factory but had to abandon the idea after the credit crisis froze access to capital. Tesla applied for $400 million in federal loans under a year-old program to fund construction of more fuel-efficient cars, only to see the Big Three automakers try to tap that fund as part of their bailout package.

And then the high gasoline prices fueling interest in electric cars vanished. At $1.80 per gallon in California, gas now costs 61 percent less than it did this summer.

The recession won't kill Tesla, Musk says. A serial entrepreneur, he's already survived one harsh economic downturn - the 2000-01 dot-com crash, which struck when he was still with PayPal, the online payment company he helped found. He learned from the experience.

"It's basically: Watch your expenses like there's no tomorrow, because there might not be," said Musk, 37. "At PayPal, we were spending money like crazy. And then we were saving money like crazy. And we almost didn't make it."

Hence Tesla's quick move to cut staff - about 80 people in all - and delay major capital expenses related to the Model S, which the company plans to sell for $60,000. With production continuing on the roadster, the company should have positive cash flow starting midway through 2009. And because the roadster costs $109,000, the company only has to sell about 1,000 per year to break even, Musk said. Tesla has a backlog of 1,100 orders.

"All we have to do is tread water and we'll be OK," he said. "And I'm pretty sure we'll do better than that."

As an entrepreneur, Musk has a busy history. In 1995, he started the online publishing company Zip2, which was purchased by a division of Compaq Computer Corp. in 1999. He also helped found PayPal, which eBay bought in 2002 for $1.5 billion.

That same year, he also created Space Exploration Technologies, better known as SpaceX, which is developing reusable spacecraft. Although he's still the SpaceX CEO, he now spends most of his time managing Tesla.

Recession-proof roadster

A recession might seem like the wrong time to be selling luxury cars of any kind, much less ones that use an all-electric technology unfamiliar to most Americans. But sales of unique, high-end vehicles usually don't plunge during downturns, according to auto industry analyst Jesse Toprak.

"Based on the limited scale of production for Tesla and the hype they've been able to build up, they're probably going to be just fine, at least for the first few years of their existence," said Toprak, who works for the auto information Web site Edmunds.com. "After that, it will depend on how these vehicles hold up."

Waiting out the storm

A startup company's jump from development to full-scale production often tests the nerves of entrepreneurs. Finding venture capital to start a three-man business is one thing; putting together $100 million or more to build a factory is quite another.

The financial crisis has made that leap more nerve-racking than ever. Many green startups are trying to wait out the storm. If their new biofuel or high-efficiency solar cell is still a few years away from production, they can sit tight, conserve as much cash as possible and hope the banks will start lending again by the time they need to build something. They can also look for more venture capital, but even that well seems to be drying up.

"It's really hit all across the board," said Brian Fan, senior director of research for the Cleantech Group, which tracks funding in the industry. "The days of easy, cheap capital in the tens of millions of dollars I think are over."

The downturn caught Tesla in mid-leap.

After years of developing its roadster, the company finally started delivering the car early this year to a long list of clients who had ordered one in advance, clients including San Francisco Mayor Gavin Newsom and California Gov. Arnold Schwarzenegger. The $60,000 Model S sedan was to be the next logical step - a luxury electric car that, while not exactly cheap, would be affordable to far more people than the roadster. But the economic downturn was accelerating. Musk says he first realized its severity when Tesla's effort to put together a $100 million financing round to help fund the factory stalled in September.

"What it really did was it stopped people from making a decision, because everyone wanted to see where the market was going to bottom out," Musk said. "And here we are in December, and it still hasn't bottomed out."

Cutting expenses

Tesla gave up on that round and went back to existing investors for another $40 million. Musk, stepping in as CEO, decided to slow down the Model S program and concentrate instead on Tesla's core businesses - the roadster and power train sales to other companies. Tesla also closed one office in Michigan and replaced it with a smaller one nearby. And it started looking for ways to cut the roadster's production costs by renegotiating contracts with suppliers.

The company's application for federal loans drew fire from some critics who questioned whether the government should be bailing out a company that only makes luxury cars. Musk responded that the money wouldn't be a bailout.

The U.S. Department of Energy fund that Tesla wants to tap was created in 2007 to help carmakers build factories for fuel-efficient cars or upgrade existing factories for the same purpose.

Musk says the company is now in good shape to reach profitability, despite the recession. Still, he's hoping the recession will be brief, perhaps ending in a year.

"It's funny: in the good times, no one thinks there can be bad times," he said. "And in the bad times, no one thinks there can be good times."

The series: During the last two weeks of the year, The Chronicle Business staff is running a series of profiles on prominent business leaders in the Bay Area who are managing their way through the severe economic downturn.