Tesla Inc. and Chief Executive Elon Musk improperly sought to squelch a union organizing effort at the electric-car company’s Fremont, Calif., factory with rules and Musk’s Twitter account, according to a judge’s ruling released Friday that also demands that Musk read aloud the findings to employees at the factory.

Complaints to the National Labor Relations Board about Tesla’s behavior led to a trial last summer, and Administrative Law Judge Amita Baman Tracy said in a decision published Friday that the evidence showed Tesla TSLA, +5.04% had engaged in unfair labor practices. Specifically, the company was found to have established rules for union organizing and paraphernalia that go against labor law, terminated two employees unfairly, interrogated employees about their union activities and telling them that joining a union would be futile.

The judge also specifically pointed to a tweet from Musk on May 20, 2018, and agreed with the complainants that it was a public threat against organizing a union. In the tweet, Musk was found to have suggested that the introduction of a union at the automotive factory would result in the loss of stock options for employees.

“Musk’s tweet can only be read by a reasonable employee to indicate that if the employees vote to unionize that they would give up stock options,” the judge wrote. “Musk threatened to take away a benefit enjoyed by the employees consequently for voting to unionize.”

In response, the judge ruled that Tesla must stop precluding union literature from being handed out in the Fremont facility’s parking lot and allow employees to distribute and wear paraphernalia from the union, along with other activities. The two employees who were terminated — Richard Ortiz and Jose Moran, the latter of whom took the fight for a union public in a February 2017 blog post — must be offered their jobs back and compensated for missed time and other issues resulting from their terminations.

See also: Tesla’s third-quarter sales seen on the rise

In addition, the judge ruled that Musk — or a board representative with Musk present — must read aloud a notice to employees summarizing the changes Tesla must make at the Fremont facility, "scheduled to ensure the widest possible attendance.” Judge Tracy noted that such an order “is an extraordinary remedy,” but said it was warranted in Tesla’s case.

“Such pervasive unlawful conduct, as described and found herein, warrants a broad cease-and-desist order and a notice reading,” the judge wrote. “Such a public reading of the notice will serve to reassure employees that their employer and its managers are bound by the Act’s requirements.”

Tesla did not immediately respond to a request for comment following the release of the ruling.