FR 9601 then BT 686 at Madrid
Rome → Madrid → Riga
Timetable, Madrid time
19:10FR 9601 from Rome at the gate
17:15BT 686 to Riga leaves the gate
22 h 05 apart on the timetable, overnight
BT 686 leaves 22 h 05 after FR 9601 arrives on the timetable: more than half a day, so not a connection we count.