* Musk says shareholders set to approve $56 bln pay package

* Social media campaign helps garner rare small-investor support

* Win for Musk likely despite opposition from major institutions

SAN FRANCISCO, June 13 (Reuters) - Elon Musk's army of small-investor allies took a victory lap with an endorsement for his $56 billion pay package after the Tesla CEO said shareholders were voting to approve it by a wide margin despite opposition from major institutions.

Mom-and-pop investors, who hold an unusually high share of the electric-vehicle maker, are typically apathetic toward voting. But in a rare show of support, many have been campaigning on social media for weeks for the celebrity billionaire CEO's pay to be reinstated after a Delaware judge voided it in January because she found that Musk had improperly controlled the process.

"An attempt to destroy Tesla foiled by retail shareholders," Omar Qazi said in a post on social media platform X after the update from Musk. "Tesla is saved," said Qazi, who posts from the handle @WholeMarsBlog and has more than 476,000 followers.

The EV market leader is due to make an official announcement on the result of the vote at its annual general meeting which begins at 4:30 p.m. EDT (2030 GMT) on Thursday. Institutional investors seemed divided on the issue. While some supported Musk's pay, others such as California Public Employees' Retirement System and proxy firms Glass Lewis and Institutional Shareholder Services urged shareholders to reject the pay package, calling the compensation excessive.

"When both the institutions and the proxy advisory firms are leaning in one direction, it's very rare for the vote to come out the other way," John Lawrence, a partner at law firm Baker Botts, told Reuters. "It shows in this case the company's understanding of the power of social media."

Backing from retail investors along with support from some big institutions was key to turning the vote in Musk's favor, a source familiar with the preliminary tally told Reuters.

"WE HAVE YOUR BACK"

Musk enjoys a global fan base for transforming Tesla from a startup to a multibillion-dollar behemoth and for innovation at his other companies including rocket maker SpaceX. But standing up to powerhouse investors who voted "no" on the pay package required more than just a fan base.

Social media has been abuzz for weeks with many users, such as Alexandra Merz, who posts on platform X as @TeslaBoomerMama, calling on people to vote. The efforts prompted some non-U.S. banks and brokerages to allow Tesla investors to vote, which was not previously the case.

"Don't mess with Tesla Retail Shareholders," Merz posted on Thursday, thanking people who voted. "Your votes will help to remedy a true injustice."

Musk himself has also been actively wooing their support with regular social media posts. He had set up a separate website to educate investors on the proposals, which also included reincorporating the company in Texas, and on how to vote. The company's board sent regular letters to shareholders highlighting Musk's importance in Tesla and alluding to the risks of losing his interest if the pay package was rejected. Musk even offered tours of Tesla's factory to certain investors who vote.

The plan worked. About 90% of the retail investors who voted were in favor, Musk said in a post on X over the weekend. The approval is critical as Musk faces an uphill legal fight to convince the Delaware judge who said the Tesla board was "beholden" to him, while Tesla is also potentially fielding fresh lawsuits over the latest vote. Still, small investors assured their continued support.

"Shareholders have spoken, again, and hopefully now our votes can officially count," X user Alicia said in a post. "@elonmusk, we've always believed in you and will continue to do so. We have your back!" (Reporting by Abhirup Roy in San Francisco; Additional reporting by Greg Roumeliotis, Editing by Matthew Lewis)