In the 19th century, Europeans possessed treaty ports in Japan in the same way they held those in China. However, Japan rapidly developed into a modern nation, and by the turn of the 20th century the Japanese had successfully negotiated with all powers to abrogate all unequal treaties with it. Japan stood alongside the European powers as part of the Eight-Nation Alliance during the infamous fifty five-day siege of the foreign embassy compound in Peking. Japan entered the 20th century as a rising world power, and with its unequal treaties with the European powers now abrogated, it actually joined in, obtaining an unequal treaty with China granting extraterritorial rights under the Treaty of Shimonoseki signed in 1895.