The modernization efforts proved to be useful in the war. Although the Japanese were able to capture the Nationalist capital at Nanking, the process took several months, with far larger losses than either side had anticipated. Despite the defeat, the fact that Chinese troops could challenge Japanese troops boosted Chinese morale. In addition, the cost of the campaign made the Japanese reluctant to go more deeply into the Chinese interior, allowing the Nationalist government to relocate China's political and industrial infrastructure into Sichuan.