The Maghreb (north-west Africa) played an important role during the Palaeolithic and later in connecting the western Mediterranean from the Phoenician to Islamic periods. Yet, knowledge of its later prehistory is limited, particularly between c. 4000 and 1000 BC. Here, the authors present the first results of investigations at Oued Beht, Morocco, revealing a hitherto unknown farming society dated to c. 3400–2900 BC. This is currently the earliest and largest agricultural complex in Africa beyond the Nile corridor. Pottery and lithics, together with numerous pits, point to a community that brings the Maghreb into dialogue with contemporaneous wider western Mediterranean developments.