FR 6723 then FR 9440 at Madrid
Marrakesh → Madrid → Lisbon
Timetable, Madrid time
22:15FR 6723 from Marrakesh at the gate
16:50FR 9440 to Lisbon leaves the gate
18 h 35 apart on the timetable, overnight
FR 9440 leaves 18 h 35 after FR 6723 arrives on the timetable: more than half a day, so not a connection we count.