Commodore Matthew C. Perry and his squadron of what the Japanese dubbed "the Black Ships", sailed into the harbor at Edo (now known as Tokyo) in July 1853. Perry sought to open Japan to trade, and warned the Japanese of military consequences if they did not agree. During the crisis brought on by Perry's arrival, the Tokugawa shogunate took, for the first time in at least 250 years, the highly unusual step of consulting with the Imperial Court, and Emperor Kōmei's officials advised that they felt the Americans should be allowed to trade and asked that they be informed in advance of any steps to be taken upon Perry's return. Feeling at a disadvantage against Western powers, the Japanese government allowed trade and submitted to the "Unequal Treaties", giving up tariff authority and the right to try foreigners in its own courts. The shogunate's willingness to consult with the Imperial Court was short-lived: in 1858, word of a treaty arrived with a letter stating that due to shortness of time, it had not been possible to consult. Emperor Kōmei was so incensed that he threatened to abdicate—though even this action would have required the consent of the shōgun.