El Ghazi signs for Cardiff after Mainz row over Israel-Hamas posts
El Ghazi, who has won two caps for the Netherlands and previously played for Aston Villa and Everton, will now be joining Welsh capital club Cardiff, who play in English football's second-tier Championship.
Last month, a German labour court ruled Mainz's decision to dismiss the former Dutch international last year "did not terminate the employment relationship" and the contract between the parties remained valid.
The ruling entitled El Ghazi, 29, to a payment from Mainz of more than 1.5 million euros ($1.63 million), AFP's sports subsidiary SID reported.
And on Wednesday, El Ghazi announced his contract had been mutually terminated, leaving him a free agent.
"I'm really hungry and looking forward to playing for this great club," El Ghazi told Cardiff's website.
"The city is amazing. I've got to feel at home, and from the moment I arrived here I've been feeling good.
"I know I've not been playing for a while. I stayed fit for myself, but team training is obviously different. When I'm fully fit, I want to help the team where I can with goals, with assists and with my experience. I will give everything for the shirt."
El Ghazi wrote on X on Wednesday that he had no regrets over his previous posts.
"It would be unconscionable to remain silent whilst we witness what is happening in Gaza," he said.
The war in Gaza began on October 7 with Hamas' unprecedented attack on southern Israel that resulted in the deaths of 1,195 people, mostly civilians, according to an AFP tally based on Israeli figures.
The militants also seized 251 hostages, 116 of whom remain in Gaza, including 42 the military says are dead.
Israel responded with a military offensive that has killed at least 38,345 people in Gaza, also mostly civilians, according to data from the health ministry in Hamas-run Gaza.