NEW YORK (Reuters) - Lead Facebook Inc FB.O underwriter Morgan Stanley MS.N took a bet earlier this week when it increased the size of the social networking firm's $16 billion initial public offering and it boosted the price.

Thanks to massive hype surrounding Facebook’s historic public offering, the wager looked safe. But a rocky first day of trading has raised questions about whether it paid off.

After a delayed start to trading, Facebook’s shares spent much of the day struggling to stay above the $38 IPO price - and ended with just a 23-cent gain.

As a result, Morgan Stanley may have spent billions of dollars to support the stock price by buying shares in the market. Some market participants said that the underwriters had to absorb mountains of stock to defend the $38 level and keep the market from dipping below it.

The firm did this by tapping into a 63 million share over-allotment option, or greenshoe, according to sources familiar with the deal.

As an indication of the cost, had Morgan Stanley bought all of the shares traded around $38 in the final 20 minutes of the day, it would have spent nearly $2 billion. Underwriters are not obligated to prop up a stock on debut, but typically do.

Morgan Stanley declined to comment.

The debut marks a rare stumble for a high-profile IPO. Facebook is the only recent U.S. internet listing not to enjoy a large price jump on its first day of trading. LinkedIn LNKD.N, Groupon GRPN.O and Pandora Media P.N all saw significant gains at their public debuts.

The debut also underscores Morgan Stanley’s go-it-alone handling of the offering process. Though 32 other underwriters signed on to the deal, Morgan Stanley retained tight control over information, decisions and allocations of shares, according to other underwriters.

To be sure, Morgan Stanley’s strong approach may have been crucial to managing such a large, high-profile offering with so many underwriters. And the fact that the stock didn’t soar on its first day means they achieved full value for their client.

Some issues were beyond Morgan Stanley’s control. Glitches at the Nasdaq stock exchange delayed the start of trading by 45 minutes, and throughout the day many investors did not receive confirmations that their orders had been completed, brokers at Morgan Stanley, Raymond James & Associates and others said. That uncertainty about their positions may have prompted some investors to sell, worsening the downward pressure on the stock.

Nasdaq posted a notice late in the day saying that orders entered for the stock before trading started “resulted in nothing being done” and offering to match orders if customers send in requests by Monday. Sources said the exchange was working through the weekend to deal with the botched trades.

Facebook also altered its guidance for research earnings last week, during the road show, a rare and disruptive move.

In many ways, the deal is a crowning moment for Morgan Stanley. When it won the coveted role as Facebook’s primary underwriter for its IPO, veteran technology banker Michael Grimes managed to convince executives at the social media giant that his bank would single-handedly control the process.

And as Grimes, co-head of global technology investment banking, boarded a Bombardier Global Express jet at Mineta San Jose International Airport with Facebook executives last week along with Morgan Stanley Internet banker Marcie Vu -- according to documents obtained by Reuters -- he had effectively accomplished his goal.

Successfully pulling off one of the largest IPOs in U.S. history would underscore Morgan Stanley's status as the top underwriter for tech offerings and set it above arch rival Goldman Sachs GS.N, with total global proceeds last year of $2.2 billion, according to Thomson Reuters data. But even with high profile deals like LinkedIn and Zynga ZNGA.O under its belt, Morgan Stanley had to be careful.

And so the bank led a highly secretive, tightly controlled process in which other institutions -- including top underwriters JPMorgan Chase & Co JPM.N and Goldman -- were effectively shut out.

“There was some frustration by JPMorgan and Goldman, as they were getting limited information. They thought they would be more inside the process,” one source close to the matter said.

Goldman Sachs declined to comment. JPMorgan did not return calls seeking comment.

For its efforts, Morgan Stanley will receive 38 percent of the overall IPO fees, about $67 million, which is more than JPMorgan and Goldman combined, according to regulatory filings.

But more importantly, Morgan Stanley was the only bank actively talking to investors on the deal and able to pull the order book together, a rare feature for IPOs where top underwriters typically split the work more evenly.

At one of the venues during the investor roadshow, dozens of fund managers congregated at the St. Regis Hotel in New York including Neuberger Berman, SAC Capital Advisors LP, Soros Fund Management LLC, Tiger Global Management LLC and Och Ziff Capital Management Group LLC, trying to get a piece of the pie, according to the sources.

Representatives for Neuberger Berman, Tiger Global and Och Ziff declined to comment. The other funds were not immediately available for comment.

With almost all 33 Facebook underwriters kept in the dark about the deal, including additional changes to terms such as pricing range and IPO size, one underwriter called the process the “Morgan Stanley show” while another underwriter said the bank is “essentially running it by themselves.”

JPMorgan pulled out all the stops when Facebook executives visited its New York headquarters. A Facebook-branded flag adorned the building and the bank gave out Facebook baseball hats and coffee cup holders. But the moves “mostly attracted press,” said one source.

Facebook Chief Financial Officer David Ebersman and VP of Finance & Treasurer Cipora Herman were the primary executives working with underwriters, a separate source close to the matter said. Facebook Chief Operating Officer Sheryl Sandberg also remained actively involved.

Ebersman had been very thorough in his thinking throughout the process, one of the sources close to the matter said, considering everything from the more transparent Dutch Auction process that Google Inc GOOG.O used to a directed shares program. In the end, Facebook decided it wanted a traditional IPO process.

Their thought was to “bring in the right shareholders” as part of the IPO process and not get tangled up in other strategies that would be disruptive to the running of Facebook’s business, the source said.

Zuckerberg was less involved, and also chose not to attend a majority of the roadshow stops last week, other than a brief appearance in his trademark hooded sweatshirt on May 7 at the Sheraton Hotel in New York and then again in Palo Alto that Friday.

The roadshow -- in which Zuckerberg was treated less as CEO and more as rockstar -- only lasted nine days rather than the typical 12.

Security was so tight that in New York attendees were asked for multiple forms of identification and were cross- checked against a list of names. According to one source, even one of Morgan Stanley’s equity sales heads had difficulty entering the roadshow lunch because his name was accidentally left off of the list.

Until late Thursday night, co-managers were still left in the dark about their allotments and if they were even going to get shares, said one underwriter who preferred anonymity because the talks are private.

“Everything was very hush hush,” he said.