Tesla Inc. secured as much as US$521 million in loans from Chinese banks to build a vehicle and battery factory in the country, putting the carmaker a step closer to producing Model 3 sedans at its first overseas plant.

The loans from China Construction Bank Corp., Agricultural Bank of China Ltd., Industrial & Commercial Bank of China Ltd. and Shanghai Pudong Development Bank Co. mature in March 2020, according to a regulatory filing. Tesla also amended a separate asset-backed credit agreement, increasing how much it can borrow by as much as US$700 million.

Tesla rose as much as 2.3 per cent after the close of regular trading. The shares were up 0.9 per cent as of 5:05 p.m. Thursday in New York.

Chief Executive Officer Elon Musk estimated in January that Tesla will need roughly US$500 million to get the plant built and production ramped up to 3,000 Model 3s a week. The total cost will be higher, and the company had said it planned to tap local banks for a majority of the funding.

The fresh borrowing follows Tesla’s largest-ever debt payment last week. Settling the US$920 million convertible bond that matured March 1 taxed the company’s balance sheet, which had about US$3.7 billion in cash and equivalents at year-end.

After years of negotiations with Chinese authorities to become the first foreign automaker to wholly own a manufacturing facility in the country, Tesla broke ground on the outskirts of Shanghai on Jan. 7. Musk has said the company plans to start battery and Model 3 production at the factory by the end of the year.

Tesla can now do so by borrowing at favorable rates. The yuan-denominated loans accrue interest at a rate equal to 90 per cent of the one-year rate published by the People’s Bank of China. For dollar-denominated loans, the rate is 1 per cent more than Libor.

Beginning local production in China is key for Tesla to reduce the costs of its cars in what is the world’s largest market for electric vehicles. Battery-powered autos have been a rare bright spot amid the broader market’s slowdown. Local manufacturing also will help the company sidestep any re-escalation of trade tensions between the U.S. and China.

In its filing, Tesla said it amended and restated its asset-backed loan credit agreement to increase the total lender commitments by US$500 million to about US$2.4 billion. The pact also permits the company to obtain up to US$200 million in additional commitments, and extend the term of most of the total commitments to 2023.