They attended the signing of a framework for co-operation in AI, days before France hosts a summit on the technology.
Morocco is increasingly a focus of European alliance-building and investment, including in illegally occupied Western Sahara.