In 1543 Nice attacked and taken by the joint French and Turkish troops, yet the Castle resisted. This is the time of the legendary Catherine Ségurane, who found back the invaders encouraging the city’s defenders. After this occurred, Duke of Savoy Emmanuel-Philibert made substantial changes to the defenses of the city and moved the upper section of the town to the lower section. The upper section became a defensive citadel and the Chateau was extended and even further fortified. So between 1550 and 1580, all civilians were forced to leave the upper section.
There wasn’t much space in the lower section, so the city built up. This is the Nice that we see today, a dense population squeezed in between the Paillon river (now covered) and the Sea.
This is one reason you see so many buildings with dates from the early 1600s when they were rebult. Most of what might have remained from the Medieval town was replaced.