Tesla Motors Inc. gained the most since April after the electric-car maker beat its car-sales forecast for the second consecutive quarter with a 52 percent surge in the three months through June.

The shares rose 4 percent to $280.02 at the close in New York for the biggest daily advance since April 27. Tesla has climbed 26 percent this year, outpacing the Russell 1000 Index's 1.3 percent increase.

Tesla delivered 11,507 Model S sedans in the second quarter, according to a statement of preliminary figures Thursday. The Palo Alto, California-based company predicted in May that it would sell 10,000 to 11,000 of the cars, its only model, during the period.

The preliminary total brings first-half sales to 21,552, less than 40 percent of Tesla's full-year target of 55,000 vehicles. Output and deliveries are projected to increase with the introduction of the Model X sport utility vehicle this quarter.

"Tesla still has to deliver on the Model X promise," Dan Dolev, a Jefferies LLC analyst, said in a telephone interview. With the Model S, "the execution is there, the demand is there, the delivery is there, so that all these areas are positive is encouraging."

The company said that the second-quarter figure may be adjusted slightly and that quarterly financial results are also affected by cost of sales and other inputs.

'Pretty Solid'

"What has kept enthusiasm on the stock down after Q1 was that the guidance for Q2 did not show a lot of growth," Dan Galves, a Credit Suisse analyst, said in a telephone interview. "It made the back half look real tough. Now that you've done 15 percent growth versus Q1 it's pretty solid. The company only has to do maybe 13 percent per quarter on the back half now."

Galves and Dolev both recommend buying the shares.

The automaker, whose biggest shareholder is Chief Executive Officer Elon Musk, reworked its Model S lineup in April, replacing the cheapest version with an all-wheel-drive car costing 7.1 percent more at $75,000. Tesla also plans to begin selling a lower-priced third car in 2017.

The company is building the world's largest battery factory near Reno, Nevada, to try to reduce costs and increase auto production to 500,000 in 2020.

Tesla's first-quarter sales jumped 56 percent from a year earlier to 10,045 vehicles, exceeding the company's forecast by 5.7 percent. The second-quarter total was a record for the carmaker, which was founded in 2003 and began deliveries of the Model S in 2012. Tesla is also developing large-scale energy-storage systems for homes and businesses.