In 1123, King Baldwin II was taken prisoner by the Artuqids, and the Kingdom of Jerusalem was subsequently invaded by the Fatimids of Egypt.
It was agreed that the Venetian fleet would help the crusaders attack either Tyre or Ascalon, the only two cities on the coast still under Muslim control; the barons from the south of the Kingdom wanted to attack Ascalon, while those in the north preferred to direct the fleet against Tyre, which was larger and wealthier and a valuable port for enemy Damascus further inland.
A treaty of alliance was established between Jerusalem and the Venetians prior to the beginning of the siege of Tyre in February 1124 (the city capitulated to the crusaders later that year).
Aside from William and Pagan, no secular authorities witnessed the treaty, perhaps indicating that the Venetians considered Jerusalem a papal fief.
They resisted Emperor Frederick II's attempts to claim the Kingdom, and virtually ignored the authority of the Lord of Tyre.
Other Italian and Provençal city-states demanded and were granted similar commercial treaties by the King of Jerusalem throughout the 12th and 13th centuries, notably the Genoese and Pisans.