IB 138 then QY 932 at Madrid
Quito → Madrid → Tangier
Timetable, Madrid time
17:20IB 138 from Quito at the gate
12:10QY 932 to Tangier leaves the gate
18 h 50 apart on the timetable, overnight
QY 932 leaves 18 h 50 after IB 138 arrives on the timetable: more than half a day, so not a connection we count.