FR 9170 then FR 2239 at Barcelona
Stockholm → Barcelona → Marrakesh
Timetable, Barcelona time
14:55FR 9170 from Stockholm at the gate
12:35FR 2239 to Marrakesh leaves the gate
21 h 40 apart on the timetable, overnight
FR 2239 leaves 21 h 40 after FR 9170 arrives on the timetable: more than half a day, so not a connection we count.