The original Shurijo Castle is believed to have been constructed between the 13th and 14th centuries by King Satto of Urasoe Castle. After expanding the grounds, King Sho Hashi later consolidated the power base of the Ryukyu Kingdom at Shuri. The king of the Ryukyus and the local government occupied the Shuri site until 1879, when the Meiji emperor brought about an end to the kingdom and made Okinawa a prefecture of Japan. The original buildings of Shuri Castle were completely destroyed by fire during the Battle of Okinawa in 1945. The reconstruction project began in the late 1980s after Ryukyu University was relocated from the castle grounds. Replicas of the original castle were constructed, and the two main gates and parts of the main wall restored.