China was controlled by foreign nations , who dominate the ports in Shanghai.China was involved in a war called the "Opium War" between Great Britain, France and China which ultimately led to China's defeat. The consequence of their defeat was the lost of 50 of their ports which were called "treaty ports, meaning the ports were opened for foreign trade and residence.