U2 7676 then EC 7651 at Lisbon
Marrakesh → Lisbon → Madrid
Timetable, Lisbon time
23:05U2 7676 from Marrakesh at the gate
19:10EC 7651 to Madrid leaves the gate
20 h 05 apart on the timetable, overnight
EC 7651 leaves 20 h 05 after U2 7676 arrives on the timetable: more than half a day, so not a connection we count.