and the Holy Roman Empire made an alliance in 972. In 973, twelve illustrious Magyar envoys, whom Géza had probably appointed, participated in the Diet held by Otto I, Holy Roman Emperor. Géza established close ties with the Bavarian court, inviting missionaries and marrying his son to Gisela, daughter of Duke Henry II. Géza of the Árpád dynasty, Grand Prince of the Hungarians, who ruled only part of the united territory, the nominal overlord of all seven Magyar tribes, intended to integrate Hungary into Christian Western Europe, rebuilding the state according to the Western political and social model. Géza's eldest son St Stephen (István, Stephen I of Hungary) became the first King of Hungary after defeating his uncle Koppány, who also claimed the throne. The unification of Hungary, the foundation of the Christian state and its transformation into a European feudal monarchy was accomplished by Stephen. Christianization The new Hungarian state was located on the border with Christendom. Since the second half of the 10th century AD, Christianity was flourished in Hungary as the German Catholic missionaries arrived from East Francia. Between 945 and 963, the main office-holders of the Principality (the gyula and the horka) agreed to convert to Christianity. In 973 Géza I and all his household were baptised, and a formal peace concluded with the Holy Roman Emperor Otto I; however he remained essentially pagan even after his baptism: Géza had been educated by his father Taksony as a pagan prince. The first Hungarian Benedictine monastery was founded in 996 by Prince Géza. During Géza's reign, the nation conclusively renounced its nomadic way of life and within a few decades of the battle of Lechfeld became a Christian kingdom. Organization of the state Until 907 (or 904), the Hungarian state was under joint rule (perhaps adopted from the Khazars). The kingship had been divided between the sacral king (some sources report the titles "prince" or "khan"), or Kende, and the military leader, or gyula. It is not known which of the two roles were assigned to Árpád and which to Kurszán. Possibly, after the Kende Kurszán's death, this division ceased and Árpád became the sole ruler of the principality. The Byzantine Constantine Porphyrogennetos called Árpád "ho megas Tourkias archon" (the great prince of Tourkia), and all of the 10th-century princes who ruled the country held this title. According to the Agnatic seniority the oldest members of the