The Phoenicians together with the Greeks, Carthaginians, and Romans occupied the territory of ancient Malta. After the division of the Roman Empire it got under Arab rule, which was defeated by the representatives of Sicily. Napoleon came to Malta in 1798; the next year British troops got the control over the territory, which was confirmed by the Treaty of Paris in 1814. During World War II Malta suffered heavy attacks by German and Italian aircraft. The country became independent in 1964, the republic within the British Commonwealth was proclaimed in 1974. Malta joined the European Union (EU) on May 1, 2004.