Why is Occitan spoken in some small enclaves in Italy?

by quief_in_my_mouth

I was reading about the Occitan language, and the enclaves of Guardia Piemontese and the Occitan Valleys and it made me curious. My first thought was maybe it has something to do with the time period when the Crown of Aragon controlled southern Italy, but I would think any "Aragonese" merchants would have largely been Catalan speakers, which is just an assumption based on most of the Mediterranean coast of the Iberian Peninsula and the Balearic Islands speaking Catalan. So what's the story? Who moved where, and when?

SignedName

Didn't Catalan used to be considered a dialect of Occitan?