I2 1854 then KM 587 at Madrid
Marrakesh → Madrid → Valletta
Timetable, Madrid time
16:20I2 1854 from Marrakesh at the gatealso IB 1854
12:30KM 587 to Valletta leaves the gate
20 h 10 apart on the timetable, overnight
KM 587 leaves 20 h 10 after I2 1854 arrives on the timetable: more than half a day, so not a connection we count.