Morgan Stanley is paying for its role in the troubled stock market debut of Facebook.

On Monday, Massachusetts' top financial regulator fined the bank $5 million for violating securities laws, the first action against the investment bank stemming from its management of Facebook's initial public stock offering.

William F. Galvin, the secretary of the commonwealth of Massachusetts, accused the bank of improperly influencing the stock offering process. The regulator's consent order asserts that a senior Morgan Stanley banker coached Facebook on how to share information with stock analysts who cover the social media company, a potential violation of a landmark legal settlement with Wall Street. While the banker never contacted the analysts directly, his actions, Galvin said, put ordinary investors at a disadvantage because they lacked access to the same research.

"The broader message here is we are going to use any means possible to enforce the strict code in place about giving out information," Galvin said in an interview. "We want to get the message across that if Wall Street wants to get confidence back, they can't disadvantage Main Street."

The consent order did not name the Morgan Stanley banker, referring to him only as "senior investment banker." But personal information detailed in the regulator's order indicated that it was Michael Grimes, one of the country's most influential technology bankers.

"Morgan Stanley is committed to robust compliance with both the letter and the spirit of all applicable regulations and laws," a Morgan Stanley spokeswoman, Mary Claire Delaney, said.

Morgan Stanley, in settling the case, neither admitted nor denied guilt.

Grimes, through Delaney, declined to comment. Although the banker was referred to in the order, Grimes has not been personally accused of any wrongdoing.

The Facebook public offering was one of the most highly anticipated stock launches of the past decade. In the run-up to the offering, investor interest was robust, prompting the company to increase the size of the offering and raise the share price to $38. But the IPO quickly turned into a debacle for Morgan Stanley. The first day of trading was plagued with problems. The shares quickly fell below their offering price. The stock closed Monday at $26.75.

Since the offering, Galvin and other regulators have opened wide-ranging investigations into Facebook and the banks that handled its debut. The continuing inquiries by the Securities and Exchange Commission and the Financial Industry Regulatory Authority are examining how the banks disseminated nonpublic information to big investors -- and whether it conflicted with Facebook's public disclosures.

Regulators are also looking into the Nasdaq, the exchange where Facebook trades. They are trying to determine whether the exchange failed to properly test its trading systems, which faltered during the stock offering.

The Massachusetts regulator is focused on Morgan Stanley's communications with analysts.

Shortly before the Facebook offering, analysts at several banks ratcheted down their growth estimates for the social network. The move came after Facebook issued an amended prospectus, detailing a potential slowdown in revenue.

A Facebook executive, whose name was not given in the order but who was referred to as the treasurer, also reached out to analysts. Galvin's order asserted that the executive, in private conversations with analysts, had provided additional information on the revenue. The order indicated that Grimes was personally involved in the decision to file the new prospectus and to have Facebook communicate with analysts.

"Morgan Stanley's senior investment banker did everything but make the phone calls himself," the Massachusetts regulator said in a statement, referring to Grimes. "He not only rehearsed with Facebook's treasurer who placed the calls to the research analysts, but he also drafted the majority of the script Facebook's treasurer utilized."

Just 12 minutes after filing the amended prospectus with regulators May 9, the Facebook treasurer phoned Wall Street research analysts from her hotel room, according to the order. She had a 15-minute conversation with Morgan Stanley analysts, and then spoke with JPMorgan Chase and other banks.

The calls provided the analysts with additional information that did not appear in the amended prospectus, the order said. The conversations, for example, included "quantitative information regarding Facebook's second-quarter 2012 projections."

This behavior, Galvin said, crossed the line, violating the regulatory settlement on stock research that Morgan Stanley and other companies signed in 2003. The agreement limits the communication between bankers and research analysts and bans companies from influencing stock reports to try to bolster banking operations.

The Morgan Stanley case falls into a curious gray area.

Bankers spend months preparing companies to go public, a role that includes providing guidance on research analysts. In this instance, Grimes did not personally place the calls, which would have been a clear violation of securities laws.

In his testimony before the Massachusetts regulator's staff, Grimes indicated that the bank had pushed for Facebook to file an amended prospectus to avoid "the appearance" that the company was sharing information with a select group of clients rather than broadly with investors. Grimes, the order noted, consulted with Morgan Stanley and Facebook lawyers. Ultimately, Facebook's chief financial officer, David A. Ebersman, emailed the company's board to say that the new filing would "help us to continue to deliver accurate" information without "someone claiming we are providing any selective disclosure."

Grimes, in testimony with the regulator, further defended his role. While the Facebook treasurer was making the calls, he noted that "I was far down the hall so I wouldn't hear anything."

Even so, Grimes, according to the consent order, emailed Ebersman to say that the Facebook treasurer "was a champ in the hotel tonight," after the treasurer wrapped up the calls.