Malta was ruled by the Order of Saint John as a vassal state of the Kingdom of Sicily from 1530 to 1798. The islands of Malta and Gozo, as well as the city of Tripoli in modern Libya, were given to the Order by Spanish Emperor Charles V in 1530. following the loss of Rhodes. The Ottoman Empire managed to capture Tripoli from the Order in 1551, but an attempt to take Malta in 1565 failed.