“Trace fossils occur in several strata of the Devonian and Carboniferous of the eastern Anti-Atlas, but they are still poorly documented. Here, we describe a fossil swimming trace from strata overlying the Hangenberg Black Shale (correlation largely based on lithostratigraphy; Postclymenia ammonoid genozone, ca. 370 Ma old). We discuss the systematic position of the tracemaker and its body size. This ichnofossil is important for three main reasons: (1) it is considered here to be the first record of Undichna from the Devonian of Gondwana, as far as we know; (2) it is the oldest record of vertebrate trace fossils from Africa; (3) it provides a unique window into the behaviour of Late Devonian fishes for which body-fossils cannot provide direct evidence. Further, we put this discovery into the macroecological context of the palaeoenvironment following the Late Devonian Hangenberg biodiversity crisis.” Open Access at Springer!