# Principality of Kod

The Principality of Kod (Cyrillic: Кодское княжество), or the Principality of Koda (Кода), was a Khanty principality located in north Western Siberia from the 15th to 17th century. It was located on both banks of the Ob River and along the river tributaries of Kazym and Irtysh, occupying an area approximately now the Oktyabrsky District of the Khanty-Mansi Autonomous Okrug. The rulers of Kod, the House of Alachev, had in their possession various fortified towns along the banks of the Ob, the largest of which being the capital of Shorkar (lit. "city on a stream"), later Alachev. Kod was generally allies of the Grand Duchy of Moscow, and later the Tsardom of Russia, engaging in conflicts with other Yugra states like the Principality of Pelym, though occasionally also siding with enemies of Moscow, like Kuchum Khan of the Sibir Khanate or rebel Ivan Bolotnikov. The principality was ultimately annexed into the expanding Russian state in 1643.

## History
### Early history

There is little to no info on the establishment of Kod; the name Koda (Kuda; "middle earth") appears in Russian chronicles first since 1484, so it can be presumed the state was established in the early 15th century. The sphere of influence of the Kod princes extended to the Khanty peoples that lived along the banks of the Vakh River.
From the beginning, the principality of Kod came into conflict with the southern Khanty states of Pelym, Kondia, and Tabary, while favorable relations were reached with Demyan, Tsingal, and Belogorje. The Kod princes recognized the supremacy of the Sibir Khanate over themselves, though this still didn't avoid conflicts with the aforementioned Khanty enemies. To the north, they plundered the nomad camps of the tundra-dwelling Samoyeds, and to the south they devastated the territories of Kondia and Sosva.

### Vassalage under Moscow

The first Russian forays into the region of Yugra was following the Russian victory of the Great Stand on the Ugra River in 1480. Three years later, the Grand Duke of Moscow Ivan III sent Fyodor Kurbsky and Ivan Saltykov-Travin into Kod, and after a short resistance the Kod princes recognized the power of Moscow. However, this supposed power Moscow wielded over Kod turned out to be nominal; in 1484 to 1483, Prince Moldan of Kod resisted the encroachments of territories under the umbrella of Moscow such as Great Perm. Due to this, in 1499, Ivan III sent a force of 5,000 led by Semyon Kurbsky to suppress the Yugra principalities, particularly Kod, leading to a heavy defeat suffered by Prince Moldan. In 1500, however, as the Russians departed, Kod steadily increased its power though it is now nowhere as powerful as it once was, inferior to the more wealthy Pelym principality. In the end, Kod re-recognized the authority of the Sibir Khanate.
In conjunction with the Siberian conquests of Yermak Timofeyevich in 1583, Prince Alach of Kod (whose dynasty is named after him) decided to take advantage of the changing geopolitical situation. Alach waited for the defeat of the principalities of Demyan, Tsingal, and Belogorje at the hands of Yermak and quickly struck a military alliance with the belligerent Cossack. As the Tsarist government ratified the agreement, Kod once again reaffirmed its vassal status to Moscow.
The unique position between Moscow and Kod led to the subjects of Prince Alach to not pay the yasak tribute, and instead were induced to serve in the growing Russian military. The Kod warriors, a group of 300 soldiers, took on the duty to serve in Russian joint-military campaigns, to assist the Russians in its annual salt expeditions to Yamysh Lake in Kazakhstan, or to serve as messengers across Siberia. In return for their service, the soldiers received a grain share from the royal treasury and the Kod princes, a monetary salary; the warriors also had the benefit of addressing the Grand Duke without any intermediaries.
In late 1583, the stamp of agreement between the Russian state and Kod was established; while Kod would receive the lands of the former Principality of Belgorje, Alach allowed the construction of an Orthodox church in the capital. The first to be baptized in Kod was Alach's wife, renamed to the Russian name of Anastasia, but the native Khanty were reluctant to receive the Christian faith. In 1584, the Kod principality waged war against Pelym and Kondia. In 1585, Alach temporarily switched alliances to the Sibir Khanate to defeat Yermak Timofeyevich, his former ally.
Despite this, the Kod reaffirmed their loyalty to Russia by distinguishing themselves in a decisive battle against Sibir's ally the Piebald Horde, a confederation of Ket and Selkup tribes. In 1593, with Alach passed away, his son Igichey led a contingent of Kod forces to the northernmost Principality of Obdorsk with Muscovite troops under voivode Peter Gorkachov. In the same year, an especially fierce attack on the part of Kod was taken against Kondia and Pelym, with assistance from the Muscovite forces. In 1594, Pelym was annexed into Russia, and Kondia soon followed in 1599.
For these victories, the Kod princes received not only rich bounties but also grants to settle lands within the modern day Beryozovsky and Tobolsky districts on February 18, 1594. Later that year, Igichey, heading a contingent of Kod soldiers, built the fortress of Surgut on the lands of the Principality of Bardak under orders of Tsar Feodor I. In 1598, Igichey led his forces to a second battle with the Piebald Horde, and later Prince of the Little Piebald Horde Kichei, capturing the Surgut Ob region in the process. In 1604, Kod forces partook in building the settlement of Tomsk on the former lands of the Eushtan Tatars. In 1607, Kod forces helped defeat an uprising led by former Obdorsk prince Vasily. In 1617, they helped conquer the northern Tungusic tribes and helped construct Makytsky prison near present day Yeniseysk. In 1620, they were dispatched to capture wartime exiles who were attempting to flee to Russia through the Urals. The last expedition involving Kod warriors was a dispatch to the Nizhnyaya Tunguska river, lasting from 1627 to 1630.
Gradually, internal conflict bubbled in the Principality of Kod, mainly between the princely nobles and the military nobility. The last prince of Kod and great-grandson of Alachev, Dmitry Mikhailovich Alachev, surrendered Kod to Russia and moved to Moscow with his family, receiving a title of nobility and feudal lands. As a result of the annexation of Kod to Russia, the entirety of the Yugra region was conquered at last.

## Location

Originally occupying a small territory along the middle Ob river, the Kod principality grew exponentially as a result of benefits awarded to it by Moscow, and later, Tsarist Russia. It can be separated into two regions: the core region of Koda, and the frontier volosts of Emdyrskaya, Vakhovskaya, Vaspukolskaya and Kolpukolskaya gifted to Kod princes later. 441 people lived in Kod at time of annexation.
The principality was located on the Ob River, both banks, occupying the stretch of the river from Beryozovo to the north to the mouth of the Endyr river to the south. Almost all Kod settlements were located on the right bank, which was more conducive to farming and living, whereas the left bank was filled with swampy coniferous forests, difficult for living.
In the center of Kod lie the capital of Shorkar, or Alachev following the rule of Prince Alach, though in reality it was composed of summer and winter towns where the royal family switched in correspondence to the seasons. The capital of Shorkar or Alachev was a classic feudal estate, where the national armory and treasury were stationed, full of heavy military armor for use in expeditions and the expensive furs of sables, silver foxes, and squirrels. Here lived also the chief shaman of the principality, the head religious figure. The dozen or so towns that were under Kod's jurisdiction were ruled by "princelings", who all submitted to the Prince of Kod, always from the Alachev dynasty.

## Society

The Khanty of Kod lived in fortified towns and unfortified towns (called yurts) not far from the settled towns, the latter used as seasonal camps for several families. Each yurt was a completely independent economic collective, and as a result most of the population of Kod lived in these yurts. The towns were military, administrative, trade and religious centers of the state.
The Kod population was divided into four castes: the princely family, the soldiers, yasak payers, and the slaves. The yasak payers, generally disenfranchised descendants of the former principalities subsumed into Kod, were paid the obligatory yasak tax in the form of sable and squirrel skins. To pay this, the yasak payers had to go to a representative of the prince of Kod which gave them the necessary equipment to pay their yasak. For the population that cannot afford to pay the tax, they fell into bondage of the prince and were employed in seasonal work in the capital of Alachev. In a 1631 census, there were 80 male slaves in the principality of Kod, 57 of whom belonged to the Prince of Kod himself and 14 to other members of the princely family.
For the non-militant populace of Kod, the economy of the principality of Kod relied mainly fishing and the processing of fish, whose products were then sold to the Sibir Khanate and later Russia. The second most profitable peaceful occupation was hunting, such as the plentiful waterfowl along the Ob River. Documents also indicate the Kod Khanty engaged in berrypicking, beekeeping, and livestock tending, and in the most favorable regions, some engaged in agriculture. The main craft in Koda was the art of processing fish skins, especially sturgeon and sterlet skins; many wear them as seasonal clothing. Though other clothing was made out of nettle, only the royalty can afford to wear actual furs as clothing.