der Marokkaner
Moroccan
A male person who comes from Morocco or has Moroccan citizenship.
Unser neuer Nachbar ist Marokkaner und kommt aus Casablanca.
Our new neighbor is Moroccan and comes from Casablanca.

Moroccan
Loading your saved state.
Moroccan
A male person who comes from Morocco or has Moroccan citizenship.
Unser neuer Nachbar ist Marokkaner und kommt aus Casablanca.
Our new neighbor is Moroccan and comes from Casablanca.

The term for the person is derived from the country name 'Marokko' (Morocco). The suffix '-aner' is often used for male inhabitants of countries or continents.
Ein junger Marokkaner hat das Turnier gewonnen.
A young Moroccan won the tournament.
Whether a person or a pastry is meant becomes clear from the context. In a bakery, a café, or when the topic is food, the pastry is meant. In all other situations, it is a person.
Ich hätte gern zwei Marokkaner und einen Kaffee, bitte.
I'd like two Moroccan cookies and a coffee, please.
When 'Marokkaner' refers to a person, the word belongs to the N-declension. This means it takes the ending '-n' in the accusative, dative, and genitive.
Hast du mit dem Marokkaner gesprochen?
Did you speak with the Moroccan?
Moroccan
'der Marokkaner' and 'marokkanisch' both refer to Morocco, but they have different grammatical roles. 'Der Marokkaner' is a noun and means a male person from Morocco or with Moroccan citizenship. 'Marokkanisch' is an adjective and describes things, people, culture, or origin. Learners may confuse them because both have the same connection to the country. As a simple guide: for a person as a noun, you say 'ein Marokkaner'; for a description, you say 'marokkanisch'.

Im Sprachkurs sitzt ein Marokkaner neben mir.
There is a Moroccan man sitting next to me in the language course.
Heute koche ich ein marokkanisches Gericht für meine Nachbarn.
Today I am cooking a Moroccan dish for my neighbors.