FR 3877 then UX 1145 at Madrid
Tangier → Madrid → Porto
Timetable, Madrid time
16:10FR 3877 from Tangier at the gate
10:35UX 1145 to Porto leaves the gate
18 h 25 apart on the timetable, overnight
UX 1145 leaves 18 h 25 after FR 3877 arrives on the timetable: more than half a day, so not a connection we count.