Elon Musk won record Tesla pay deal from shareholders.

Tesla shareholders backed Elon Musk's record pay package for CEO and approved plans to move the company's legal headquarters to Texas.

The result is a victory for the billionaire who campaigned fiercely for a payout of up to $56 billion. The exact amount depends on Tesla stock price.

“Damn, I love you,” he told enthusiastic shareholders gathered in Texas for the company’s annual meeting.

The eye-watering sums sparked criticism and raised concerns that the company's board was too submissive and close to Mr Musk.

A judge in Delaware invalidated the package earlier this year, siding with a small investor who sued over the deal.

The fight over the plan has raised concerns about Musk's leadership at a time when his stock has fallen from highs and his position in the electric vehicle industry is under pressure.

But Mr. Musk rallied his fan base to support the deal, appealing especially to individual investors who make up an unusually large portion of the company's shareholder base.

“This is a very strong endorsement,” said Karl Brauer, an auto industry analyst.

Mr Musk added that he had garnered enough shareholder support “to justify the package”.

The company did not immediately disclose the vote percentage.

Musk previewed the results in a post on his social media company, X (formerly known as Twitter).

The company's stock price rose nearly 3% following Musk's announcement.

Dan Ives, an analyst at Wedbush Securities, said the gains signal investor confidence that the deal will get done and reduce the threat of Musk leaving the company.

“If this proposal hadn’t worked out, a lot of bad things and scenarios could have happened, including Musk starting down a path away from being CEO of Tesla,” he wrote in the memo.

The compensation plan entitles Musk to about 300 million shares, or about 10% of the company, as a reward for achieving company goals, including turning the company into a $650 billion company once thought unfeasible.

“From what I understand, Tesla stock is up about 1,100%, which is very impressive. Most CEOs have never done something like that,” Brauer said.

The vote is non-binding and legal experts said it was unclear whether the court that blocked the deal would accept a re-vote and allow the company to restore the pay package.

“Voting doesn’t change anything,” said Mathieu Shapiro, managing partner at law firm Obermayer Rebmann Maxwell & Hippel.

He added, “This just gives Tesla an opportunity to leverage the vote to make better decisions going forward.”