The United States used to operate a federal court in Shanghai, China. By treaty Americans were exempt from the authority of Chinese courts, and The U.S. Court for China was established in 1906 to handle cases involving Americans. With the outbreak of World War II, the Japanese occupied the courthouse and detained the judge for 6 months before releasing him. The court was formally abolished in 1943.