In 784, the capital moved briefly to Nagaoka-kyō, then again in 794 to Heian-kyō (modern Kyoto), which remained the capital until 1868. Political power within the court soon passed to the Fujiwara clan, a family of court nobles who grew increasingly close to the imperial family through intermarriage. In 858, Fujiwara no Yoshifusa had himself declared sesshō ("regent") to the underage Emperor. His son Fujiwara no Mototsune created the office of kampaku, which could rule in the place of an adult reigning Emperor. Fujiwara no Michinaga, a skilled statesman who became kampaku in 996, governed during the height of the Fujiwara clan's power and had four of his daughters married to Japanese Emperors. The Fujiwara clan held on to power until 1086, when Emperor Shirakawa ceded the throne to his son Emperor Horikawa but continued to exercise political power, establishing the practice of cloistered rule, by which the reigning Emperor would function as a figurehead while de facto power was held by a retired predecessor behind the scenes.Throughout the Heian period, the power of the imperial court declined. The court became so self-absorbed with power struggles, and with the artistic pursuits of court nobles, that it neglected the administration of government outside the capital. The nationalization of land undertaken as part of the ritsuryō state decayed as various noble families and religious orders succeeded in securing tax-exempt status for their private shōen manors. By the eleventh century, more land in Japan was controlled by shōen owners than by the central government. The imperial court was thus deprived of the tax revenue to pay for its national army. In response, the owners of the shōen set up their own armies of samurai warriors. Two powerful noble families that had descended from branches of the imperial family, the Taira and Minamoto clans, acquired large armies and many shōen outside the capital. The central government began to employ these two warrior clans to help suppress rebellions and piracy. Although Japan's population stabilized during the late-Heian period after hundreds of years of decline, this was accompanied by the growth of a new class of slaves composed of poor farmers, debtors, and criminals sold into bondage.During the early Heian period, the imperial court successfully consolidated its control over the Emishi people of northern Honshu. Ōtomo no Otomaro was the first man the court granted the title of seii tai-shōgun ("Great Barbarian Subduing General"). In 802, seii tai-shōgun Sakanoue no Tamuramaro subjugated the Emishi people, who were led by Aterui. By 1051, members of the Abe clan, who occupied key posts in the regional government, were openly defying the central authority. The court requested the Minamoto clan to engage the Abe clan, whom they defeated in the Former Nine Years War. The court, thus, temporarily reasserted its authority in northern Japan. Following another civil war – the Later Three-Year War – Fujiwara no Kiyohira took full power; his family, the Northern Fujiwara, controlled northern Honshu for the next century from their capital Hiraizumi.Between 812–814 CE, a smallpox epidemic killed almost half of the Japanese population.In 1156, a dispute over succession to the throne erupted and the two rival claimants (Emperor Go-Shirakawa and Emperor Sutoku) hired the Taira and Minamoto clans in the hopes of securing the throne by military force. During this war, the Taira clan led by Taira no Kiyomori defeated the Minamoto clan. Kiyomori used his victory to accumulate power for himself in Kyoto and even installed his own grandson Antoku as Emperor. The outcome of this war led to the rivalry between the Minamoto and Taira clans. As a result, the dispute and power struggle between both clans led to the Heiji Rebellion in 1160. In 1180, Taira no Kiyomori was challenged by an uprising led by Minamoto no Yoritomo, a member of the Minamoto clan whom Kiyomori had exiled to Kamakura. Though Taira no Kiy

Question: Where was the capital in 1867?
Answer: Heian-kyō