FR 9875 then FR 572 at Madrid
Rabat → Madrid → Porto
Timetable, Madrid time
17:20FR 9875 from Rabat at the gate
09:20FR 572 to Porto leaves the gate
16 h apart on the timetable, overnight
FR 572 leaves 16 h after FR 9875 arrives on the timetable: more than half a day, so not a connection we count.