UX 58 then FR 6791 at Madrid
São Paulo → Madrid → Marrakesh
Timetable, Madrid time
05:10UX 58 from São Paulo at the gate
18:10FR 6791 to Marrakesh leaves the gate
13 h apart on the timetable
FR 6791 leaves 13 h after UX 58 arrives on the timetable: more than half a day, so not a connection we count.