Illustration by The New York Times

Facebook’s debut was supposed to be Nasdaq’s ultimate coup.

But in the weeks since the social network’s much-ballyhooed — and ultimately botched — initial public offering, the relationship has soured.

In Facebook parlance, it’s complicated.

Executives at the Internet company are pinning much of the blame on Nasdaq, according to several people close to the company and its underwriters, who spoke on the condition of anonymity because of continuing shareholder lawsuits. Tensions remain so high that Facebook is still considering switching exchanges and is weighing the costs of such a move, these people said.

As the drama plays out, Nasdaq, the first electronic stock market, faces one of its hardest tests since it was founded 41 years ago.

For years, the exchange, considered friendly to start-ups, was the preferred place for up-and-coming technology companies. Now, Nasdaq is trying to salvage its reputation with Facebook and the rest of Silicon Valley while also fending off the advances of its archrival, the New York Stock Exchange, which has ramped up efforts in the industry.

Steven Senne/Associated Press

Lucas Jackson/Reuters

Mark Lennihan/Associated Press

“Nasdaq will be wearing that albatross for quite a while,” said Lise Buyer, founder of Class V Group, an advisory firm for initial public offerings. “The errors associated with Facebook’s I.P.O. will now be part of Nasdaq’s conversations.”

Nasdaq, for its part, has expressed contrition, with its chief executive, Robert Greifeld, publicly acknowledging the firm’s arrogance during the I.P.O. The exchange has also agreed to set aside $40 million for broker losses. Even so, Nasdaq defends its position as a major player in technology listings.

“For more than two decades, Silicon Valley has played a vital role in Nasdaq’s evolution,” said Joseph G. Christinat, a Nasdaq spokesman. “Nasdaq will always strive to be part of the Valley’s start-up ecosystem.”

Nasdaq’s troubles come at a challenging time for the industry.

The Securities and Exchange Commission is pressing exchanges to bolster controls, with open investigations on Nasdaq, N.Y.S.E. and others. Authorities are focusing on the Facebook I.P.O., trying to determine if Nasdaq acted improperly as it scrambled to push Facebook live and clear orders. So far, Nasdaq has not been charged with any wrongdoing, but the scrutiny represents a marked shift for the S.E.C., which has traditionally had a light touch with exchanges.

Facebook and its underwriters have been criticized for being too aggressive on the size and price of the offering. Still, many experts argue that it’s impossible to discount the psychological impact of Nasdaq’s problems.

“Very small actions can trigger very large dynamic mechanisms,” said Dan Ariely, a professor of behavioral economics at the Fuqua School of Business at Duke.

Nasdaq is navigating a forest of questions, as rival N.Y.S.E. settles onto its turf.

N.Y.S.E., once known as the dowdy exchange of blue chips, has aggressively courted Silicon Valley in the last five years, calling on executives and holding private dinners at places like the Four Seasons in East Palo Alto, Calif. The Big Board recently snapped up the listings of a number of technology start-ups, including LinkedIn, Pandora and Yelp.

While N.Y.S.E.’s sales pitch used to center on its established brand, it now talks about technology and client services. A few years ago, the exchange also revised requirements to make it easier for smaller technology companies to list. The two exchanges battled for months over Facebook. Nasdaq won, in part, because it agreed to shorten the so-called seasoning period for newly public companies. The move would allow Facebook to join the Nasdaq 100 three months after its listing, people with knowledge of the matter have said.

But the short-lived victory has become an ordeal.

In recent weeks, the divide between Nasdaq and Facebook has deepened, as both face a bundle of shareholder lawsuits. In June, Facebook filed a motion alongside its lead underwriters to combine these lawsuits in New York. Nasdaq, which faces some of the same suits, was left out of the motion. Shares of Facebook, which hit a low of $25, currently trade around $31.10, well below the offering price of $38.

Facebook is upset about Nasdaq’s lack of communication, according to people close to the company. Executives were left out of important decisions like whether the stock should begin trading at all given the crush of early issues. Once trading did begin on May 18, Nasdaq did not contact Facebook’s chief financial officer, David Ebersman, who was the main point person for the I.P.O.

Executives at the social network have also grown frustrated by the technology problems. Many order confirmations were delayed. These were eventually released hours later, along with stock that ended up in a separate Nasdaq account. But the unexpected flood of shares looked like a giant order of roughly 11 million shares, weighing on the stock, according people with knowledge of the matter.

Facebook executives believe Nasdaq added to the woes the next week. Before the second trading day, Nasdaq alerted traders to file claims by noon if they wanted financial “accommodations” for the I.P.O. Executives believe the notice encouraged investors to dump shares to prove a loss on Facebook, prompting the stock to fall more than $4 in the first hour of trading that day.

Perhaps most disconcerting was Nasdaq’s conference call with reporters on Sunday, just days after the I.P.O. On the call, Mr. Greifeld, Nasdaq’s chief, assured the press that Nasdaq’s errors had not affected the stock’s performance.

“It would lead a reasonable person to conclude that it didn’t have an impact on the stock price,” he said.

The statement was tantamount to an act of betrayal, according to those close to Facebook. Once again, the Facebook team was baffled. Why didn’t the exchange warn them about Mr. Greifeld’s comments? Incensed, a Facebook executive told Mr. Greifeld, “You don’t understand the hole you’re in.”

Most start-ups hoping to go public are not worried about encountering Facebook’s problems. As the largest Internet I.P.O. on record, Facebook attracted a barrage of coverage. Many industry insiders interviewed believe Nasdaq will move quickly to improve its controls. It is currently working with I.B.M., for instance, to review its entire technical system.

Still, the fumbles are ugly blemishes for an exchange that has prided itself on its tech heritage. After dominating technology listings for the last decade, Nasdaq’s ranking has slipped. So far this year, Nasdaq has accounted for 11 of the 24 technology listings, with the rest going to N.Y.S.E., according to Renaissance Capital, an I.P.O. advisory firm. “It might be an anomaly,” said Aaron Levie, the chief executive of Box, a data storage company. “But Nasdaq is getting more competition from N.Y.S.E., which has been really proactive out here.”

Amid mounting pressure, Mr. Greifeld made one more visit to Menlo Park three weeks ago.

In a meeting with Mr. Ebersman and other executives, he apologized, according to people briefed on the meeting. He acknowledged that he had said that Nasdaq’s problems did not impact Facebook’s price, but conceded that that assessment did not fully factor in the psychology of the market.

After that, a chill settled in the room, as several executives quietly scrawled his statement on their notepads.