Reign
Accompanied back to Hungary by German troops, Solomon entered Székesfehérvár without resistance. He was ceremoniously "crowned king with the consent and acclamation of all Hungary" in September 1063, according to the Illuminated Chronicle. The same source adds that the German monarch "seated" Solomon "upon his father's throne", but did not require him to take an oath of fealty. Solomon's marriage with Henry IV's sister, Judith—who was six years older than her future husband—also took place on this occasion. Judith, along with her mother-in-law Anastasia, became one of her young husband's principal advisors.
Solomon's three cousins - Géza and his brothers - returned after the German troops had been withdrawn from Hungary. They arrived with Polish reinforcements and Solomon sought refuge in the fortress of Moson at the western border of his kingdom. The Hungarian prelates began to mediate between them in order to avoid a new civil war.
Solomon and his cousins eventually reached an agreement, which was signed in Győr on 20 January 1064. Géza and his brothers acknowledged Solomon as lawful king, and Solomon granted them their father's one-time ducatus. As a token of their reconciliation, Duke Géza put a crown on Solomon's head in the cathedral of Pécs on Easter Sunday. Their relationship remained tense; when the cathedral burned down during the following night, they initially accused each other of arson. The episode is described in the Hungarian Illuminated Chronicle as follows:
[Sudden] flames seized that church and the palaces and all nearby buildings, and they collapsed in one devastating conflagration. Everyone was gripped with fear at the shock of the roaring flames and the terrible shattering of the bells as they fell from the towers; and none knew where to turn. The King and the Duke were in an amazed stupor; terrified by the suspicion of foul work, each went his separate way. In the morning they were apprised through faithful messengers that in truth there had not been on either side any evil intention of treachery, but that the fire had been happening of chance. The King and the Duke came together again in the goodness of peace.
The king and his cousins closely cooperated in the period between 1064 and 1071. Both Solomon and Géza were, in 1065 or 1066, present at the consecration of the Benedictine Zselicszentjakab Abbey, established by Palatine Otto of the Győr clan, a partisan of the king. They invaded Bohemia together after the Czechs had plundered the region of Trencsén (present-day Trenčín, Slovakia) in 1067. During the following year, nomadic tribes broke into Transylvania and plundered the regions, but Solomon and his cousins routed them at Kerlés (present-day Chiraleş, Romania). The identification of the marauders is uncertain: the Annales Posonienses and Simon of Kéza write of Pechenegs, the 14th-century Hungarian chronicles refer to Cumans, and a Russian chronicle mentions the Cumans and the Vlachs.
Pecheneg troops pillaged Syrmia (now in Serbia) in 1071. As the king and the duke suspected that the soldiers of the Byzantine garrison at Belgrade incited the marauders against Hungary, they decided to attack the fortress. The Hungarian army crossed the river Sava, although the Byzantines "blew sulphurous fires by means of machines" against their boats. The Hungarians took Belgrade after a siege of three months. However, the Byzantine commander, Niketas, surrendered the fortress to Duke Géza instead of the king; he knew that Solomon "was a hard man and that in all things he listened to the vile counsels of Count Vid, who was detestable in the eyes both of God and men", according to the Illuminated Chronicle.
Division of the war-booty caused a new conflict between Solomon and his cousin, because the king granted only a quarter of the booty to the duke, who claimed its third part. Thereafter the duke negotiated with the Byzantine Emperor's envoys and set all the Byzantine captives free without the king's consent. The conflict was further sharpened by Count Vid; the Illuminated Chronicle narrates how the count incited the young monarch against his cousins by saying that as "two sharp swords cannot be kept in the same scabbard", so the king and the duke "cannot reign together in the same kingdom".
The Byzantines reoccupied Belgrade in the next year. Solomon decided to invade the Byzantine Empire and ordered his cousins to accompany him. Only Géza joined the king; his brother, Ladislaus, remained with half of their troops in the Nyírség. Solomon and Géza marched along the valley of the river Great Morava as far as Niš. Here the locals made them "rich gifts of gold and silver and precious cloaks" and Solomon seized the arm of Saint Procopius of Scythopolis. He donated the relic to the Orthodox monastery of Syrmium (present-day Sremska Mitrovica, Serbia).
After their return from the campaign, both Solomon and Géza began to make preparations for their inevitable conflict and were seeking assistance from abroad. They concluded a truce, which was to last "from the feast of St Martin until the feast of St George", from 11 November 1073 until 24 April 1074. However, Solomon chose to attack his cousin as soon as the German troops sent by his brother-in-law arrived in Hungary. The royal army crossed the river Tisza and routed the troops of Géza, who had been abandoned by many of his nobles before the battle, at Kemej on 26 February 1074.
A strong army soon arrived in Hungary, headed by Géza's brother-in-law, Duke Otto I of Olomouc. In the decisive battle, which was fought at Mogyoród on 14 March 1074, Solomon was defeated and forced to flee from the battlefield.