NEW YORK (Reuters) - Tesla Inc Chief Executive Elon Musk has reached a deal with the U.S. Securities and Exchange Commission to settle a dispute over his use of Twitter, agreeing to submit his public statements about the company’s finances and other topics to vetting by its legal counsel, according to a court filing on Friday.

If it is approved by a judge, the deal means the Tesla founder no longer faces the prospect of being held in contempt for violating an earlier settlement with the agency, which had required him to submit statements “material” to investors for prior review.

The new agreement, disclosed in a filing in Manhattan federal court, lays out in more detail exactly what kinds of statements must be reviewed.

Shares of Tesla rose 1.4 percent to $238.50 in after hours trading. The agreement lifts a cloud that has hung over Musk as Tesla tries to ramp up production of its most important vehicle, the Model 3 sedan, and make a profit at the same time.

“It could really have turned out far worse for him,” said Stephen Diamond, a professor of securities law at Santa Clara University. “The consequences of thumbing his nose at the SEC could have been far worse for him and the company.”

Tesla has struggled with logistics difficulties in delivering its Model 3 to global customers, a declining share price and lingering questions about the sustainability of demand. Earlier this week, the electric vehicle maker posted a $702 million loss, and warned of a loss in the second quarter.

Musk’s lawyer did not immediately return a request for comment.

TWEET APPROVAL

The SEC sued Musk last year after he tweeted on Aug. 7 that he had “funding secured” to take Tesla private at $420 per share. The agency said the tweet, which sent Tesla’s share price up as much as 13.3 percent, violated securities laws. Musk’s privatization plan was at best in an early stage and financing was not in place.

FILE PHOTO: Tesla Inc. CEO Elon Musk (C) exits after attending a S.E.C. hearing at the Manhattan Federal Courthouse in New York, April 4, 2019. REUTERS/Eduardo Munoz

Musk settled the lawsuit, agreeing to step down as chairman and have the company’s lawyers pre-approve written communications, including tweets with material information about the company.

In February, the SEC accused Musk of violating that settlement by sending a tweet about Tesla’s production numbers that had not been vetted by the company’s attorneys, and asked U.S. District Judge Alison Nathan in Manhattan to hold him in contempt.

At an April 4 court hearing, the judge declined to rule on the contempt motion and told the SEC and Musk to work out their differences and come to a settlement.

Musk’s lawyers have argued that the February tweet did not contain new information that was material to investors, and that Musk did not need pre-approval for all tweets about Tesla under the settlement.

They also argued the settlement was too ambiguous for Musk to be held in contempt.

The new agreement unveiled Friday addresses that ambiguity by listing what kinds of statements must be vetted. They include statements about Tesla’s financial condition, proposed or potential deals, production numbers, performance projections, financing or lending arrangements and Musk’s own transactions in the company’s securities.

It also gives the company’s board of directors the right to seek preapproval about additional topics if they believe doing so would protect shareholders’ interests.

Diamond said the new language adds clarity to the original agreement and places significant restraints on Musk’s use of Twitter.

“Any attempt by Musk to circumvent the process will be much more easily policed,” he said.

Musk has been an outspoken critic of the SEC throughout his legal dispute with the SEC, which he once dubbed the “Shortseller Enrichment Commission.”

In the early morning of Feb. 26, after the regulator filed its contempt motion, Musk tweeted: “Something is broken with SEC oversight.”

Musk has been CEO of Tesla since 2008 and has more than 25 million followers on Twitter.