BEIJING/TOKYO -- The protracted trade standoff with the U.S. has driven China closer to Japan for developing self-driving vehicles, with the possibility of Washington ending technological cooperation figuring into Beijing's calculation.

The Japan Automobile Manufacturers Association and the China Association of Automobile Manufacturers signed a memorandum of understanding in Tokyo on Friday to cooperate on setting international standards for self-driving technology. The partnership initially will focus on control mechanisms and telecommunications protocols.

Chinese efforts on autonomous driving originally centered on U.S. partners. The Apollo project, a massive state-sponsored research and development alliance led by Chinese tech company Baidu, includes the likes of Ford Motor and chip houses Nvidia and Intel.

Google, which has been at odds with censorship-prone Chinese authorities, fully relaunched R&D operations on the mainland at the start of the year. Waymo, the automated-driving arm owned by Google parent Alphabet, has formed a subsidiary in Shanghai. This wider embrace of Google by China reveals the one-party state's intention of drawing American tech collaborators.

But deteriorating U.S.-China relations over trade have changed Beijing's game plan. The U.S. has accused China of stealing secrets in the high-tech sector, and tensions have escalated this year. The Justice Department announced Wednesday the indictment of Xu Yanjun, a senior official in China's Ministry of State Security, accusing him of trying to steal trade secrets from American aerospace companies.

Washington is applying tighter scrutiny to Chinese foreign investments in the U.S., with regulators raising the specter of technology leaks. American companies could face similar restrictions regarding direct investments in China.

Self-driving technology has the potential to determine who takes the lead in the automotive industry, adding to U.S. wariness toward Beijing.

Behind Friday's agreement between China and Japan are delicate calculations by two countries aiming for supremacy in the field. Japan is a significant presence in the global auto market, with Toyota Motor and the alliance between Nissan Motor and France's Renault among the top three players.

Japan also boasts top-notch technology for sensors and other components. With China facing the real possibility of being cut off from U.S. tech partners, bringing Japan closer would help Beijing grab a share of the global automotive hegemony.

China approached Japan with the idea of cooperating to unify both countries' specifications for electric-vehicle charging equipment, and the two sides reached a development agreement in August. Japan first came out with the CHAdeMO fast-charging standard in 2010. But eight U.S. and European automakers adopted the rival Combo Charging System in 2012, creating a split between Tokyo and the West.

A partnership with China offers benefits for the Japanese industry as well. China is the world's largest auto market, accounting for 30% of the global total. Japanese automakers are latecomers in China behind the likes of Volkswagen and General Motors, and next-generation vehicles will be crucial in efforts to catch up.

But self-driving autos are expected to form the core of the so-called data economy. The amount of data one holds directly translates to competitive advantage. China may suggest a data-sharing arrangement, which the Japanese side cannot ignore if it wants to sell autos in the mainland. Honda Motor already takes part in the Apollo project.

But Japan has diplomatic implications to consider. Japanese manufacturers still count the U.S. as a key market, and Tokyo is staking its position as Washington's ally amid the trade conflicts. If corporate Japan and corporate China form too cozy a relationship, they could draw the wrath of U.S. President Donald Trump's administration.