A large-scale warehouse complex (Hoenzaka Site) was in operation during the Kofun period (5th century), developed as a base for trade and exchange with the international Naniwa Port, in the northernmost part of Uemachi Upland, which extends north-south through the center of Osaka City. Later, two palaces were built: the Former Naniwa Palace and the Latter Naniwa Palace, from the Asuka period (7th century), through the Nara period (8th century). The Former Naniwa Palace is thought to have been the Naniwanonagaranotoyosakinomiya, which was built after the transfer of the capital to Naniwa during the Taika Reform (645). Emperor Shomu rebuilt it as the Latter Naniwa Palace during the Nara period (710–794).