BEIJING, July 11 (Reuters) - Germany's BASF managed to wrap up a preliminary deal to build China's first wholly foreign-owned chemicals complex quite quickly, aided in part by trade tensions between Beijing and Washington, sources with knowledge of the matter said.

The proposed complex, worth some $10 billion in investment to 2030, will be located in Guangdong, China's most populous province which had been worried about the impact of a U.S. decision to heavily penalise telecom firm ZTE Corp , also based there.

Fears that a U.S.-China trade war would hurt investment prospects for the business-friendly province made local government officials that much more receptive to overtures by BASF, a global giant with state-of-the art technology, separate people briefed on matter also said.

BASF's announcement, part of $23 billion worth of bilateral deals unveiled as German Chancellor Angela Merkel met Chinese Premier Li Keqiang in Berlin this week is conspicuous for its timing, trade and chemical industry experts said.

In reaching out to Europe, China is showing it is open for business as the trade row with Washington deepens.

BASF's coup, while still a rare example of a foreign player prising open the Chinese government's tight control over its energy and chemical industries, also follows measures by Beijing to lift some caps on foreign ownership in the auto and banking sectors.

"Now that we have this trade war that was kicked off last week, Beijing is telling Washington that it is still doing business and that there are capable companies around the world to do business with," said John Driscoll, director of consultancy JTD Energy in Singapore.

The outcomes of Li's visit, during which the widow of Chinese Nobel Peace Prize-winning political dissident Liu Xiaobo, left de facto house arrest in China to live in Germany, signalled a measured warming in what has been a bilateral relationship fraught with spying allegations and commercial mistrust.

China this week has also approved a huge new wholly owned Shanghai factory for U.S. electric car maker Tesla Inc, and a $2.3 billion joint venture organic light-emitting diode (OLED) plant to be built by South Korea's LG Display Co Ltd .

In contrast, the Trump administration on Tuesday raised the stakes in the trade dispute, threatening 10 percent tariffs on a list of $200 billion worth of Chinese imports, prompting Beijing to warn it would be forced to retaliate.

ZTE HELPED

BASF's search for a potential site for its second major project in the world's largest chemical market had been in the works for a while, an industry insider with knowledge of the deal said. Like other sources, the industry insider declined to be identified due to the sensitivity of the matter.

The German firm had decided to go it alone rather than working with a state-owned partner as it had done previously and chose Guangdong as recently as three months ago, the person said, adding BASF had spied a "window of opportunity", banking on the province's desire for cutting-edge technology.

The person also said local governments had become more aware that they "cannot not own everything" and foreign investment could help them build what they wanted.

BASF's overtures coincided with a crisis for ZTE, slapped with a ban barring U.S. suppliers from selling it components after the firm broke an agreement to discipline executives who conspired to evade U.S. sanctions on Iran and North Korea. ZTE has had to curtail operations and is working to lift the ban.

"The ZTE case helped," the person said on Tuesday, without elaborating further.

BASF's media relations department said the company chose Guangdong for its first major investment in South China to tap the region's fast economic growth and declined to comment on whether ZTE's travails had helped speed up the decision-making.

Amid China's increased openness to foreign investment, BASF's knowledge of doing business in China meant it could "seize the right opportunity at the right time", a Beijing-based energy industry executive said.

RIVALS LAG

Under the agreement, BASF will explore building an integrated chemicals complex with petrochemicals plants and a steam cracker producing 1 million tonnes per year of ethylene.

It is a chance to greatly expand in a Chinese chemicals market worth an estimated $1.5 trillion a year, feeding plastics, coatings and adhesives to the southern province's fast-growing consumer electronics and automotive sectors.

By contrast, rival petrochemical giants have yet to strike wholly owned similar-sized deals in China - which accounts for around 40 percent of the world's chemical production. So far, they've stuck with joint ventures even though China eased restrictions on foreign ownership in the sector in 2011.

Royal Dutch Shell started an expanded joint venture petrochemical plant in Huizhou in May with China National Offshore Oil Corporation (CNOOC). Exxon Mobil late last year signed a joint study memorandum of understanding with the government of Huizhou for a similar facility - although that agreement allows for the possibility of full ownership.

BASF plans to do a pre-feasibility study of its site by the end of the year, followed by a thorough analysis by end-2019 with construction estimated to start in 2023. The company aims to complete the first plants by 2026.

BASF's first major foray in China, nearly two decades ago, was a joint venture with state oil major Sinopec to build a $5.2 billion petrochemical complex in Nanjing, Jiangsu province. ($1 = 0.8529 euros) (Reporting by Michael Martina and Aizhu Chen; Additional reporting by Meng Meng in Beijing , Henning Gloystein in Singapore, Arno Schuetze in Frankfurt and Sijia Jiang in Hong Kong; Writing by Josephine Mason; Editing by Tony Munroe and Edwina Gibbs)