 In 1218 Albert asked King Valdemar II of Denmark for assistance, but Valdemar instead arranged a deal with the Order.The king was victorious in the Battle of Lindanise in Revelia in 1219, to which the origin of the Flag of Denmark is attributed.He subsequently founded the fortress Castrum Danorum, which was unsuccessfully besieged by the Estonians in 1220 and 1223.