AA 8651 then EC 7694 at Barcelona
Madrid → Barcelona → Lisbon
Timetable, Barcelona time
19:15AA 8651 from Madrid at the gate
15:30EC 7694 to Lisbon leaves the gate
20 h 15 apart on the timetable, overnight
EC 7694 leaves 20 h 15 after AA 8651 arrives on the timetable: more than half a day, so not a connection we count.