Baldwin died without heirs in 1118, during a campaign against Egypt, and the kingdom was offered to his brother Eustace III of Boulogne, who had accompanied Baldwin and Godfrey on the crusade. Eustace was uninterested, and instead the crown passed to Baldwin's relative, probably a cousin, Baldwin of Le Bourg, who had previously succeeded him in Edessa. Baldwin II was an able ruler, and he too successfully defended against Fatimid and Seljuk invasions. Although Antioch was severely weakened after the Battle of Ager Sanguinis in 1119, and Baldwin himself was held captive by the emir of Aleppo from 1122–1124, Baldwin led the crusader states to victory at the Battle of Azaz in 1125. His reign saw the establishment of the first military orders, the Knights Hospitaller and the Knights Templar; the earliest surviving written laws of the kingdom, compiled at the Council of Nablus in 1120; and the first commercial treaty with the Republic of Venice, the Pactum Warmundi, in 1124. The increase of naval and military support from Venice led to the capture of Tyre that year. The influence of Jerusalem was further extended over Edessa and Antioch, where Baldwin II acted as regent when their own leaders were killed in battle, although there were regency governments in Jerusalem as well during Baldwin's captivity. Baldwin was married to the Armenian noblewoman Morphia of Melitene, and had four daughters: Hodierna and Alice, who married into the families of the Count of Tripoli and Prince of Antioch; Ioveta, who became an influential abbess; and the eldest, Melisende, who was his heir and succeeded him upon his death in 1131, with her husband Fulk V of Anjou as king-consort. Their son, the future Baldwin III, was named co-heir by his grandfather.