Electric carmaker Tesla Inc ( TSLA ) 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.