After the Black Ships, Perry's naval squadron, had compelled Japan to enter into relations with the Western world, the first foreign policy debate was over whether Japan should embark on an extensive modernization to cope with the threat of the "eastward advance of Western power," which had already violated the independence of China, or expel the "barbarians" under the parole "sonnō jōi" and return to seclusion. Opening the country caused an upheaval that in the end caused the demise of the Tokugawa bakufu, but the "shōguns" of the period were too weak to pose a serious opposition. The opening of Japan accelerated a revolution that was just waiting to happen.