Gibraltar is dominated by the massive Rock of Gibraltar, at the foot of which is the densely populated town area. Throughout history Gibraltar has been an important strategic location to hold and consequently it has been strongly fortified and defended. This began with the Moors, who controlled much of Spain, in the 11th century. After the Moors left, the Spanish turned the tables, and used it as a base from which to attack North Africa. In 1704, Anglo-Dutch forces captured Gibraltar from Spain during the War of the Spanish Succession. The territory was ceded to Great Britain in perpetuity under the Treaty of Utrecht in 1713. Gibraltar is now a British Overseas Territory although Spain continues to assert claims of sovereignty over it. During the Napoleonic Wars and World War II Gibraltar was an important base for the Royal Navy as it controlled the Strait of Gibraltar, the narrow entrance and exit to the Mediterranean Sea.