The international settlement came to an abrupt end in December 1941 when Japanese troops stormed in immediately following the attack on Pearl Harbor. In early 1943, new treaties signed by Chiang Kai-shek's Republican government formally ended the extraterritorial privileges of Americans and Britons, although its terms were moot until the recovery of Shanghai following Japan's 1945 surrender. The French later surrendered their privileges in a separate agreement in February 1946.