The Oki Islands have been settled since the Japanese Paleolithic period, and numerous remains from the Jōmon, Yayoi and Kofun periods indicates continuous human occupation and activity. It was organized as a province under the Ritsuryō reforms in the later half of the seventh century, and the name "Oki-no-kuni" appears on wooden markers found in the imperial capital of Nara. During the late Heian period, due to its remoteness, Oki Province came to known as a place for political exile. In 1221, Emperor Go-Toba was sent to Oki, and died in exile on the islands; In 1332, Emperor Go-Daigo was also sent in exile to Oki, but later managed to escape and regain control of the country. From the Kamakura period Oki Province was governed primarily by the shugo of Izumo Province. In the Muromachi period, it was ruled successively by the Sasaki clan, the Yamana clan and the Kyōgoku clan. In the Sengoku period the Amago clan held this province. After the Amago fell and the Tokugawa shogunate was established, Oki Province was declared a tenryō dominion under the direct control of the shōgun. The daimyō of Matsue Domain, belonging to the Matsudaira clan, was appointed governor. The entire province had an assessed revenue of only 18,000 koku, although its actual revenues were closer to only 12,000 koku. The province was a frequent port of call for the Kitamaebune coastal trading ships during the Edo period. The exact location of the capital of the province is not known, but is believed to have been somewhere within Suki District on Dōgojima, within the borders of the modern town of Okinoshima. The Kokubun-ji still exists as a Shingon secttemple in Okinoshima, and the foundation stones of many of the original buildings can be found within its grounds, although a complete archaeological investigation has yet to be performed. There are two Shinto shrines which claim the title of Ichinomiya of the province. The Mizuwakasu Jinja in Okinoshima, and the Yurahime Jinja in Nishinoshima. Following the Meiji Restoration, Oki Province became Oki Prefecture from February to June 1869. It was then attached to Tottori Prefecture until 1876, when it was transferred to Shimane Prefecture.