In early September 1940, Heinrich Georg Stahmer arrived in Tokyo to assist Ott in negotiating the Tripartite Pact with Japan. Stahmer later replaced Ott as ambassador when Richard Sorge, who had been working for Ott in Japan as an agent for the Abwehr, was unmasked as a Soviet spy in Japan in late 1941.