The ruling comes at a tense time for Elon Musk, who recently asked for 25% control over Tesla|Steve Jurvetson|CC BY 2.0

A Delaware judge ruled yesterday that the $56 billion compensation package Tesla reached with CEO Elon Musk in 2018, subsequently making him the wealthiest person in the world, was “deeply flawed” and must be undone.

The judge observed Musk’s share-based compensation was negotiated by a Tesla board that seemed duty-bound to him. The pay package faced legal challenges from shareholders who claimed the process leading to it was improper.

The ruling, subject to appeal, nullifies the largest pay package in corporate America. Musk reacted strongly on social media, advising against incorporating companies in Delaware.

Musk recently asked for a 25% control over Tesla. As of Tuesday, his 2018 share package was worth $51 billion—a quarter of his estimated $210.6 billion fortune.

Tesla’s shares dropped about 3% after the court decision.