China and Germany continued to maintain diplomatic relations in 1941, with elements from both sides wishing to resume co-operating despite the declining German interest in Asia. However, Germany's failure to defeat the United Kingdom steered Hitler away from that move. Germany signed the Tripartite Pact, along with Japan and Italy, at the end of 1940. In July 1941, Hitler officially recognised Wang Jingwei's puppet government in Nanking. After the attack on Pearl Harbor, China formally joined the Allies and declared war on Germany on December 9, 1941.