Coloman the Learned, also the Book-Lover or the Bookish (; ; ; 10703February 1116), was King of Hungary from 1095 and King of Croatia from 1097 until his death. Because Coloman and his younger brother Álmos were underage when their father Géza I died, their uncle Ladislaus I ascended the throne in 1077. Ladislaus prepared Colomanwho was "half-blind and humpbacked", according to late medieval Hungarian chroniclesfor a church career, and Coloman was eventually appointed bishop of Eger or Várad (Oradea, Romania) in the early 1090s. The dying King Ladislaus preferred Álmos to Coloman when nominating his heir in early 1095. Coloman fled from Hungary but returned around 19 July 1095 when his uncle died. He was crowned in early 1096; the circumstances of his accession to the throne are unknown. He granted the Hungarian Duchyone-third of the Kingdom of Hungaryto Álmos.

In the year of Coloman's coronation, at least five large groups of crusaders arrived in Hungary on their way to the Holy Land. He annihilated the bands who were entering his kingdom unauthorized or pillaging the countryside, but the main crusader army crossed Hungary without incident. He invaded Croatia in 1097, defeating its last native king Petar Snačić. Consequently, he was crowned king of Croatia in 1102. According to the late 14th-century Pacta conventa (the authenticity of which is not universally accepted by scholars), he was only crowned after having ratified a treaty with the leaders of the Croatian nobility. For centuries thereafter, the Hungarian monarchs were also the kings of Croatia.

Coloman had to face his brother's attempts to dethrone him throughout his life; Álmos devised plots to overthrow him on at least five occasions. In retaliation, he seized his brother's duchy in 1107 or 1108 and had Álmos and Álmos' son Béla blinded in about 1114. Hungarian chronicles, which were compiled in the reigns of kings descending from his mutilated brother and nephew, depict Coloman as a bloodthirsty and unfortunate monarch. On the other hand, he is portrayed as "the most well-versed in the science of letters among all the kings of his day"The Deeds of the Princes of the Poles (ch. 2.29), p. 173. by the contemporaneous chronicler Gallus Anonymus. Coloman's decrees, which governed many aspects of lifeincluding taxation, trade and relations between his Christian and non-Christian subjectsremained unmodified for more than a century. He was the first Hungarian king to renounce control of the appointment of prelates in his realms.

Early years (c. 1070–1095)

Coloman was the elder of the two sons of King Géza I who survived infancy. Géza's Byzantine second wife, whose baptismal name is unknown, left Hungary after her husband's death, implying that she was not his children's mother. Consequently, the mother of Coloman and his younger brother, Álmos, must have been Géza's first wife, Sophia, whose family is unknown. According to historians Gyula Kristó and Márta Font, the brothers were born around 1070, because they were mature enough to hold offices in the early 1090s. Coloman's uncommon baptismal name was recorded as Colomanus or Colombanus in medieval documents written in Latin. Kristó writes that he was most probably named after Saint Coloman of Stockerau, a missionary who was martyred in Austria in the early 11th century. Another possibility is that his name is of Turkish origin (meaning "rest"), because his brother bore a Turkish name.

Coloman's father ascended the throne in 1074. Because Coloman and Álmos were minors when he died on 25April 1077, Géza's brother Ladislaus I succeeded him. The new king decided that Coloman should be prepared for a career in the Church. The king's decision was unusual as Coloman was older than Álmos and elder brothers were rarely ordained priests. The 14th-century Illuminated Chronicle stated that Coloman was "of mean stature, but astute and quick of apprehension", adding that he was "shaggy and hirsute, half-blind and humpbacked, and he walked with a limp and stammered in his speech".The Hungarian Illuminated Chronicle (ch. 143.102), p. 131. If the chronicle preserved genuine tradition of his appearance, his physical deformity may have influenced his uncle's decision. However, modern scholars tend to refute this view, emphasizing that the chronicle was completed in the reigns of kings descending from Álmos.

In preparation for his clerical life, Coloman learnt to read and write and acquired a good knowledge of Latin. His proficiency in canon law was praised in a letter that Pope Urban II addressed to him in 1096. According to Kristó, upon finishing his studies he was ordained priest and in the early 1090s was appointed bishop. Hungarian chronicles completed in the 14th and 15th centuries say that Coloman was bishop of either Eger or Várad. For instance, the Illuminated Chronicle states that he was "bishop of Warad" (or Várad),The Hungarian Illuminated Chronicle (ch. 152.108), p. 133. and LadislausI wanted to appoint him "bishop of Agria" (or Eger).The Hungarian Illuminated Chronicle (ch. 139.100), p. 130.

According to the Illuminated Chronicle, both Coloman and Álmos accompanied their uncle on a military campaign against Bohemia in early 1095. Before reaching the border of his kingdom, LadislausI "was overcome by a grave infirmity"The Hungarian Illuminated Chronicle (ch. 140.101), p. 130. and decided to appoint Álmos as his heir. Instead of obeying his uncle's decision, Coloman fled to Poland. He returned to Hungary around 29July 1095 when his uncle died. The exact circumstances of his ascension to the throne are uncertain. The Illuminated Chronicle states Ladislaus had invited him back from Poland. The same source adds that Álmos, "in the true simplicity of his heart honoured his brother, Coloman, and yielded to him the crown of the kingdom", which suggests that he ascended the throne without bloodshed. On the other hand, Coloman was crowned king in early 1096, the delay implying that the two brothers had been fighting for the crown before they reached an agreement. It is also possible, as proposed by Font, that he could only be crowned after Pope UrbanII had released him from his clerical vows.

Reign Facing the crusaders (1095–1096)

Coloman was crowned in Székesfehérvár by Archbishop Seraphin of Esztergom. According to the Illuminated Chronicle, at the same time, he "granted the dukedom with full rights" to Álmos.The Hungarian Illuminated Chronicle (ch. 142.102), p. 131. This report shows that Álmos only acknowledged his brother's rule in exchange for receiving the duchy once held by their father and grandfather, an area that comprised one third of the territory of the kingdom.

Shortly after his coronation, Coloman had to face problems that the armies of the First Crusade caused while passing through Hungary. For decades, Hungary had been able to supply a significant number of Western European pilgrims with food during their journey to the Holy Land, but the movement of tens of thousands of crusaders across the country endangered the natives' subsistence. The first group of crusaders, led by Walter Sans Avoir, reached the frontier in early May 1096. Coloman received them in a friendly way and allowed them into the kingdom. He also authorized them to buy food in the markets, although harvest had not started yet. They proceeded through Hungary without any major conflicts. The only incident occurred near the Hungarian–Byzantine border at Zimony (Zemun, Serbia). Here, "certain Hungarians with evil minds"Albert of Aachen: Historia IerosolimitanaHistory of the Journey to Jerusalem (ch. i.6), p. 11. attacked sixteen crusaders who had tried to buy weapons near the town, seizing the crusaders' clothes, armor, and money.

The next arrivals, headed by Peter the Hermit, arrived in late May or early June. Coloman permitted them to enter Hungary only after Peter pledged that he would prevent them from pillaging the countryside. According to Guibert of Nogent's records, Peter could not keep his promise: the crusaders "burned the public granaries ..., raped virgins, dishonored many marriage beds by carrying off many women", although "the Hungarians, as Christians to Christians, had generously offered everything for sale" to them.The Deeds of God through the FranksGesta Dei per Francos (Book Two), p. 148. Peter himself claimed that he and his companions had passed through the country without incident until they reached Zimony, where they learnt of the story of the sixteen crusaders who had been robbed by the Hungarians. The crusaders besieged and took the town, where they massacred "[a]bout four thousand Hungarians",Albert of Aachen: Historia IerosolimitanaHistory of the Journey to Jerusalem (ch. i.8), p. 17. according to the contemporaneous Albert of Aix's estimation. They only withdrew when Coloman's troops approached them.

A third band of crusaders reached Nyitra (Nitra, Slovakia) and began plundering the region. These were soon routed by the locals. A fourth army came to Moson in the middle of June. Coloman did not allow them to leave the region, either because he had learnt of their troublesome behavior during their journey, or he had realized that their movement across Hungary could jeopardize the stability of the local economy. To seize food and wine, the crusaders made frequent pillaging raids against the nearby settlements. Coloman decided to attack them, but the commanders of the army convinced him to persuade the crusaders to surrender their weapons and money, promising them that they would be supplied with food during their journey. After the crusaders were disarmed, Coloman's troops attacked and massacred them near Pannonhalma in early July.

Alarmed by these incidents, Coloman forbade the crusaders who arrived under the leadership of Count Emicho in the middle of July to enter Hungary. Ignoring the king's order, they broke through the defensive lines and laid siege to Moson. Their catapults destroyed the walls in two places, enabling them to storm into the fortress on 15August. Coloman made preparations to flee to Rus', fearing that the crusaders would occupy the whole country. However, for no apparent reason, a panic broke out among the attackers that enabled the garrison to carry out a sortie and rout them. Modern scholars agree that rumours about the sudden arrival of Coloman's army frightened the crusaders off from the fortress. According to Albert of Aix, contemporaneous Christians thought that Emicho's defeat was a punishment that God inflicted on the pilgrims because they had massacred many Jews "rather from greed for their money than for divine justice".Albert of Aachen: Historia IerosolimitanaHistory of the Journey to Jerusalem (ch. i.29), p.59.

The first crusader army organized by the Holy See reached the borders of Hungary in September 1096. It was led by Godfrey of Bouillon, Duke of Lower Lorraine. Godfrey sent a knight who had already been known to Coloman to start negotiations about the crusaders' entry into Hungary. Eight days later, Coloman agreed to meet with Godfrey in Sopron. The king allowed the crusaders to march through his kingdom but stipulated that Godfrey's younger brother Baldwin and his family should stay with him as hostages. The crusaders passed through Hungary peacefully along the right bank of the Danube; Coloman and his army followed them on the left bank. He only released his hostages after all the crusaders had crossed the river Sava, which marked the kingdom's southern frontier. The uneventful march of the main crusader army across Hungary established Coloman's good reputation throughout Europe.