SAN FRANCISCO — The credit crisis that has been haunting the stock market for months wasn't enough to scare investors away from the IPO of the world's largest credit card processor.

Overcoming the jitters that have battered many of the lenders that issue its cards, Visa Inc. sold 406 million shares at $44 apiece late Tuesday to raise nearly $18 billion and complete the most lucrative initial public offering in U.S. history.

At the open of trade Wednesday, shares soared nearly 48 percent, or $21, to $65.

Shares sold well out of the range of $37 to $42 per share that Visa set three weeks ago, reflecting high demand to own a piece of a company that's promising earnings growth of 20 percent despite a credit crunch that's choking the U.S. economy.

"This shows that all the recent financial turmoil obviously hasn't bothered a lot of people," said Nicholas Einhorn, an IPO analyst for Renaissance Capital of Greenwich, Conn.

Investment bankers could still exercise an option to buy another 40.6 million Visa shares during the next 30 days. If that happens, Visa's IPO will end up raising $19.7 billion before expenses.

Visa faces another litmus test Wednesday when its shares are scheduled to begin trading on the New York Stock Exchagnge under the "V" ticker symbol. The San Francisco-based company will make its debut with a market value of about $36 billion.

Based on the strong demand among money managers who wanted a piece of the IPO, Einhorn anticipates Visa shares will quickly soar above $50.

Visa has been touting its stock as a safe haven — a message that apparently resonated with investors.

"In times like this, you generally see a flight to quality," said Joel Greenberg, a New York attorney who has advised on other IPOs.

Unlike credit card lenders, Visa doesn't carry any consumer debt on its books. The company makes its money from processing fees, which have been steadily rising for years, including the past two U.S. recessions in 1991 and 2001.

Since the last recession, Visa also has been able to entice consumers to use its credit and debit cards more frequently to pay for staples like groceries, gas and even utility bills. Visa estimates about 42 percent of its transactions fall into this "nondiscretionary" category, up from 27 percent in 2000.

Visa conceivably could benefit from tougher times if more cash-strapped consumers rely on their credit cards to make ends meet, said Aite Group analyst Gwenn Bezard. "And even if people can't pay back the debt, Visa still makes money. It's a very attractive company."

The IPO should help bolster the wobbly financial services industry as banks write off billions of dollars in loans that have soured amid the worst housing slump since the 1930s.

More than $10 billion of the IPO proceeds are being used to buy back some of the shares owned by the banks that have helped build Visa during the past 50 years.

JPMorgan Chase & Co., Visa's biggest customer and shareholder, is in line for the biggest payoff from Tuesday's IPO — about $1.25 billion, based on figures provided in Securities and Exchange Commission documents.

That's five times more than New York-based JPMorgan has agreed to pay in a proposed takeover of investment bank Bear Stearns Co., a major casualty of the credit crisis.

Other big winners in Visa's IPO include: Bank of America Corp., expected to receive roughly $625 million; National City Corp., about $435 million; Citigroup Inc., about $300 million; and U.S. Bancorp and Wells Fargo & Co., both getting more than $270 million.

All the banks will remain major Visa shareholders.

The IPO also is expected to generate more than $500 million in fees for Visa's team of investment bankers, led by JPMorgan and Goldman Sachs & Co.

Besides paying banks, Visa is depositing $3 billion in an escrow account to insulate its shareholders from lawsuits alleging the company profited by stifling competition.

Those legal headaches are one of the chief reasons that Visa decided to go public and pose the biggest investment risk in the IPO, Bezard said.

The IPO gives investors a chance to profit from the rise of electronic payments as more people eschew cash. The trend is expected to accelerate in the years ahead as an entire generation weaned online grow up to enter the job market and begin buying more merchandise and services on the Web, where electronic payments are standard.

Visa already dwarfs its closest competitor, MasterCard Inc., whose stock has more than quintupled since that company went public less than two years ago.

But analysts say Visa priced its IPO more aggressively than MasterCard, making it less likely that its stock will appreciate as dramatically in the months ahead.

Visa processed 44 billion transactions totaling $3.2 trillion in 2006, according to the Nilson Report, an industry newsletter. MasterCard handled 23.4 billion transactions totaling $1.9 trillion in the same year.

Hurt by legal expenses, Visa suffered an $861 million loss on revenue of $5.2 billion in its last fiscal year ended Sept. 30. Visa bounced back in its fiscal first quarter with a $424 million profit, a 70 percent increase from the previous year.