After a friendly welcome, Olaf went on to gather an army and eventually fight in the Battle of Stiklestad on 29 July 1030, in which Harald took part on his brother's side. The battle was part of an attempt to restore Olaf to the Norwegian throne, which had been captured by the Danish king Cnut the Great (Canute). The battle resulted in defeat for the brothers at the hands of those Norwegians who were loyal to Cnut, and Olaf was killed while Harald was badly wounded. Harald was nonetheless remarked to have shown considerable military talent during the battle. After the defeat at the Battle of Stiklestad, Harald managed to escape with the aid of Rögnvald Brusason (later Earl of Orkney) to a remote farm in Eastern Norway. He stayed there for some time to heal his wounds, and thereafter (possibly up to a month later) journeyed north over the mountains to Sweden. A year after the Battle of Stiklestad, Harald arrived in Kievan Rus' (referred to in the sagas as "Garðaríki" or "Svíþjóð hin mikla"). He likely spent at least part of his time in the town of Staraya Ladoga ("Aldeigjuborg"), arriving there in the first half of 1031. Harald and his men were welcomed by Grand Prince Yaroslav the Wise, whose wife Ingegerd was a distant relative of Harald. Badly in need of military leaders, Yaroslav recognised a military potential in Harald and made him a captain of his forces. Harald's brother Olaf Haraldsson had previously been in exile to Yaroslav following the revolt in 1028, and "Morkinskinna" says that Yaroslav embraced Harald first and foremost because he was the brother of Olaf. Harald took part in Yaroslav's campaign against the Poles in 1031, and possibly also fought against other 1030s Kievan enemies and rivals such as the Chudes in Estonia, the Byzantines, as well as the Pechenegs and other steppe nomad people. After a few years in Kievan Rus', Harald and his force of around 500 men moved on south to Constantinople ("Miklagard"), the capital of the Eastern Roman Empire (later known as the Byzantine Empire), probably in 1033 or 1034, where they joined the Varangian Guard.