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