DETROIT - Electric car manufacturer Tesla Motors and a former executive have settled a legal dispute that stemmed from the company's early struggles to launch a battery-powered sports car, the company said on Monday.

Martin Eberhard, a Tesla founder and former chief executive, sued the company in May, accusing the current CEO, Elon Musk, of defaming him and orchestrating his ouster.

Musk made hundreds of millions of dollars as the co-founder of online payment service PayPal, which was sold to eBay Inc in 2002.

Musk is also among the founders of Tesla, which has had three CEOs in the last two years.

Terms of the settlement between Eberhard and Tesla were not disclosed.

I'm glad that we could put this behind us and direct all our energy toward making Tesla one of the great car companies of the 21st century, Musk said in a statement.

In a court filing in June, Tesla had sought to have Eberhard's suit dismissed.

The company said then that Eberhard had left Tesla's finances in a shambles and failed to meet targets for the cost or production schedule for the Roadster.

In the statement issued on Monday, Musk praised Eberhard.

Industry-changing efforts are virtually impossible. Without Martin's indispensable efforts, Tesla Motors would not be here today, Musk said.

A blog Eberhard maintained in which he expressed his side of the story was no longer available on Monday, and he could not be reached for comment.

Tesla sells the $109,000 battery-powered Roadster and is working to develop a second, lower-cost model, an electric sedan known as the Model S.

The company said earlier this month that it had delivered 700 Roadsters since February 2008.

The U.S. Department of Energy has offered Tesla $465 million in low-cost loans to build manufacturing facilities needed for its sedan launch.

Daimler AG took a 10-percent stake in Tesla in May and then sold 40 percent of that stake in July to Abu Dhabi-based Aabar Investments.

(Reporting by Kevin Krolicki, Editing by Phil Berlowitz)