Founder and CEO of Tesla Motors Elon Musk speaks during a media tour of the Tesla Gigafactory, which will produce batteries for the electric carmaker, in Sparks, Nevada, U.S. July 26, 2016. REUTERS/James Glover II

(Reuters) - Tesla Inc said on Friday it had raised about $1.2 billion, roughly 20 percent more than it had planned, by selling common shares and convertible debt, ahead of the launch of the crucial Model 3 sedan.

The company, led by Elon Musk, said it sold 1.3 million common shares at $262 apiece to raise $350 million and that it raised another $850 million though the sale of convertible senior notes due 2022. (bit.ly/2n5Bf8C)

The electric car company said on Wednesday it planned to sell $250 million worth of stock and $750 million in notes.

Tesla had been expected to raise capital since late last year, with the expectations gaining steam last month after Musk said the company could be “close to the edge” on cash needs.

Musk had Tesla was considering a number of options, including raising capital, to reduce risk ahead of the upcoming Model 3 sedan, the $35,000 mass-market vehicle on which the company’s future profitability hinges.

Tesla said Musk, already the company’s top shareholder with a stake of about 21 percent as of December, bought 95,420 common shares for $25 million in the latest stock sale.

The 1.3 million shares sold represents about 0.8 percent of Tesla’s outstanding shares as of Dec. 31.

Tesla’s shares were up 0.3 percent at $262.71 in premarket trading on Friday.