Malta was later ruled by the Phoenicians, Carthaginians, Romans, Byzantines and Arabs before it was occupied by the County of Sicily in 1091. The island then became part of the Kingdom of Sicily until it was given to the Order of Saint John along with Gozo and Tripoli (North Africa) in 1530. In 1192 Tancred, King of Sicily created Margaritus of Brindisi the first Count of Malta. In 1565, the Order and the Maltese withstood a major Ottoman invasion which became known as the Great Siege of Malta. The Order ruled Malta for over 250 years and built many great pieces of architecture, including the capital city Valletta. In 1798, the French under Napoleon occupied Malta and ruled from 1798–1800. Napoleon's stay lasted from 12–18 June when he resided at Palazzo Parisio in Valletta. The French remained until the Maltese rebelled against their rule. In 1800, the British took control over Malta and the island initially became a British protectorate, and a colony a couple of years later. The British ruled for about 150 years and Malta became independent in 1964. Ten years later the State of Malta became the Republic of Malta. Malta joined the European Union in 2004 and adopted the Euro four years later.