People were here long before any town. The cave paintings, found in 1959, show prehistoric use. The caves may be one mouth of a linked chain of sinkholes running far into the mountains towards Granada.
The Romans built three settlements in the area, one of them Detunda, and large remains of it survive. Arab rule began in the early 8th century. The name Nerja is said to come from Arabic for abundant spring, though that is a folk etymology.
A castle from the 9th century stood where the Balcón is now. Around 1487 a promenade replaced it, and that is the Balcón de Europa you walk on today. It was first called La Batería, after the guns in its fortified tower.
In May 1812, during the Peninsular War, British ships supported Spanish guerrillas against the French on this coast. Their fire destroyed the forts. Two rusty guns at the end of the Balcón are what remains.
Alfonso XII came in 1885 after an earthquake. Local folklore says he stood where the Balcón now is and named it the balcony of Europe. Archive documents are said to show the name was older.
Tourism is the main industry, and the few fishermen with boats on the beach earn a slim living. Until about the 1990s the town kept a strong Spanish identity, and since then many British people have retired here.