FR 2761 then KM 587 at Madrid
Bari → Madrid → Valletta
Timetable, Madrid time
18:45FR 2761 from Bari at the gate
12:30KM 587 to Valletta leaves the gate
17 h 45 apart on the timetable, overnight
KM 587 leaves 17 h 45 after FR 2761 arrives on the timetable: more than half a day, so not a connection we count.