Electric carmaker Tesla Inc (TSLA) - Get Report said Thursday it signed an agreement with lenders in China for a 12-month credit facility of up to 3.5 billion yuan, or about $521 million, for the company's Gigafactory in Shanghai.

The company broke ground on the factory in January.

An SEC filing said Tesla entered into an agreement with China Construction Bank Corporation, Agricultural Bank of China Limited , Industrial and Commercial Bank of China Limited,  and Shanghai Pudong Development Bank Co., Ltd. 

"The proceeds of such loans may be used only for expenditures related to the construction of and production at our Gigafactory Shanghai. The China Loan Agreement will terminate and all outstanding loans will mature on March 4, 2020, and the loan facility is non-recourse to Tesla or its assets," the filing said.

China is a key market for Tesla, but the ongoing trade tensions between the U.S. and the world's second largest economy have put expansion plans in a bind. By building its electric vehicles in the country, Tesla will be able to avoid the worst of the trade tariffs and better compete with Chinese electric vehicle makers.

On Wednesday Tesla introduced V3 Supercharging, a new technology the electric carmaker said "will ultimately cut the amount of time customers spend charging by an average of 50%."

The company said in a blog on its website that the new supercharger can provide a Model 3 Long Range operating at peak efficiency 75 miles of charge in five minutes..

Tesla said the V3 Supercharger stations will allow owners to charge at the full power their battery can take, with no more splitting power between two cars. 

"With these significant technical improvements, we anticipate the typical charging time at a V3 Supercharger will drop to around 15 minutes," Tesla said.

The company also introduced a new "On-Route Battery Warmup" software feature. Whenever a driver navigates to a Supercharger station, the vehicle "will intelligently heat the battery to ensure you arrive at the optimal temperature to charge, reducing average charge times for owners by 25%."

Shares of Tesla closed up slightly to $276.59.