The consolidation of the Hungarian state began during the reign of Géza. After the battle of Arcadiopolis, the Byzantine Empire was the main enemy of the Hungarians. The Byzantine expansion threatened the Hungarians, since the subjugated First Bulgarian Empire was allied with the Magyars at that time. The situation became more difficult for the principality when the Byzantine Empire 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.