The land of Tesla Gigafactory at a groundbreaking ceremony of Tesla Shanghai Gigafactory in Shanghai, China January 7, 2019. REUTERS/Aly Song

By Yilei Sun and Adam Jourdan

SHANGHAI/BEIJING (Reuters) - Tesla Inc (TSLA.O) broke ground on Monday for its Shanghai Gigafactory where it plans to begin making its Model 3 electric vehicles (EV) by year-end, a first step in localizing production in the world's largest auto market.

At a ceremony at the site of the plant on the outskirts of Shanghai, Chief Executive Elon Musk joined the city's mayor and other local government officials to formally begin construction of a factory that Tesla has said will cost around $2 billion.

"We think with the resources here we can build the Shanghai Gigafactory in record time and we're looking forward to hopefully having some initial production of the Model 3 towards the end of this year and achieving volume production next year," Musk said at the event.

The so-called Gigafactory is China's first wholly foreign-owned car plant, a reflection of China's broader shift to open up its car market, even amid a trade war with the United States which has seen a rise in tariffs on cars imported from the U.S.

Producing cars locally is likely to help Tesla minimize the impact of the trade war, which has forced the EV maker to adjust prices of its U.S.-made cars in China. Keeping prices in check will also help Tesla fend off competition from a swathe of domestic EV startups such as Nio Inc (NIO.N), Byton and XPeng Motors.

"Affordable cars must be made on same continent as customers," Musk wrote on Twitter ahead of the event.

China raised the import tariff on U.S. cars to 40 percent in July, but cut it to 15 percent from the start of this year as part of a trade war ceasefire. The lower rate will last until the end of March pending trade talks.

Trade war aside, the carmaker is building the plant in an auto market that likely contracted last year for the first time in decades. However, sales of so-called new-energy vehicles (NEVs) - a category which includes Tesla's battery-powered cars - continue to be strong in a country where the government aims to shift away entirely from combustion engine vehicles.

"Shanghai Giga will produce affordable versions of 3/Y for greater China. All Model S/X & higher cost versions of Model 3/Y will still be built in US for WW market, incl China," Musk said in another tweet, referring to the worldwide market.

CONSTRUCTION TARGETS

Tesla has been pushing forward its plans for the 500,000 vehicle capacity plant after it secured a site in October, hiring staff, starting procurement for building materials and setting up a local financial leasing company.

"Tesla's sales (in China) have dropped over the past few months because of high price caused by the tariffs. And the competition is getting more and more fierce," said Alan Kang, Shanghai-based analyst for consultancy LMC Automotive.

"With the construction of the Shanghai factory, the faster the better (for Tesla)."

(This story has been corrected to say China's auto market likely contracted last year, not set to contract this year, in the eighth paragraph)