IB 138 then FR 3876 at Madrid
Quito → Madrid → Tangier
Timetable, Madrid time
11:40IB 138 from Quito at the gatealso BA 4205, LA 5426, QR 6532, CZ 7333
06:15FR 3876 to Tangier leaves the gate
18 h 35 apart on the timetable, overnight
FR 3876 leaves 18 h 35 after IB 138 arrives on the timetable: more than half a day, so not a connection we count.