Koshi Province was an ancient province of Japan and is listed as one of the original provinces in the Nihon Shoki. The region as a whole was sometimes referred to as Esshū. In 701 AD, per the reforms of the Taihō Code, Koshi was divided into three separate provinces: Echizen, Etchū, and Echigo. In 823 AD, the two eastern districts of Echizen Province were separated to form Kaga Province. Kaga was thus the last province to be created under the ritsuryō system. The same year, the northern portion of Enuma District became Nomi District, and the southern portion on Kaga District became Ishikawa District. Kaga District itself was renamed Kahoku District. The provincial capital and provincial temple were located in what is now the city ofKomatsu; however, there does not appear to have been a provincial nunnery. The Ichinomiya of the province is the Shirayama Hime Shrine in what is now the city of Hakusan. Under the Engishikiclassification system, Kaga was ranked as a "superior country" in terms of importance and "middle country" in terms of distance from the capital. Despite this classification, Kaga never developed a powerful local gōzoku clan but was divided into many shōen estates. During the early Sengoku period, the province was largely under the control of the Ikkō-ikki, who established a loosely governed confederation in the province. The area was eventually conquered by Oda Nobunaga's general Shibata Katsuie and subsequently came under the control Maeda Toshiie under the rule of Toyotomi Hideyoshi. The Maeda clan retained control of the province as part of Kaga Domain during the Edo periodTokugawa shogunate. From 1639, Enuma Domain and a portion of Nomi Domain were separated from Kaga Domain into the 100,000 kokuDaishōji Domain, which was ruled by a junior branch of the Maeda clan. Following the Meiji Restoration and the abolition of the han system in 1871, Kaga Province was divided into Kanazawa Prefecture and Daishōji Prefecture, which were merged with Fukui Prefecture. However, only a few months later in 1872, Kanazawa and Daishōji were divided back out and merged with Nanao Prefecture to form today's Ishikawa Prefecture. In 1876, former Etchū Province was united with Ishikawa, only to become separated again in 1883.