Fatimid control of Jerusalem ended when it was captured by Crusaders in July 1099. The capture was accompanied by a massacre of almost all of the Muslim and Jewish inhabitants. Jerusalem became the capital of the Kingdom of Jerusalem. Godfrey of Bouillon, was elected Lord of Jerusalem on 22 July 1099, but did not assume the royal crown and died a year later. Barons offered the lordship of Jerusalem to Godfrey's brother Baldwin, Count of Edessa, who had himself crowned by the Patriarch Daimbert on Christmas Day 1100 in the basilica of Bethlehem.