The Egypt international, who was out of contract at the end of the season, has signed a deal with his former club until June, with an option to extend for a further two years
Mainz have not disclosed any details regarding the transfer fee but they have revealed that the Egypt international, who spent three seasons with the club between 2005 and 2008 before moving to the Westfalenstadion, has signed a contract with the club until June 2012; with the option to extend for a further two years.
"I am happy that the transfer has been worked out at the last moment," Zidan enthused on the club's official website.
"I wanted to return to Mainz. I have never forgotten the great time I had there with the club and their fans.
"I've had fantastic years in Dortmund, who were looking for me to stay, but I wanted a new sporting challenge."
Dortmund's decision to offload Zidan means that the club are now unlikely to also part company with Barrios, who was expected to move to Craven Cottage before the close of the transfer window on Tuesday night.
However, Zidan himself stated earlier this month that the club had told the forward duo that only one of them would be allowed to leave at this stage of the season.
The possibility of Barrios also departing cannot be discounted, though, with Patrick Helmes' future still up in the air.
The striker has fallen out of favour at Wolfsburg but has been linked with Borussia Monchengladbach, Hannover and Eintracht Frankfurt, who have reportedly just made an improved bid to land the former Germany international. If Helmes leaves, Wolfsburg could target the Argentina-born Paraguay international as a replacement up front.
With the January window coming to a close on Tuesday, Goal.com is your address for all the latest activity on the transfer market. Stay up to date with what's happening in all the big leagues in our all-day LIVE! for the climax of the transfer window, and read up on what else we have to offer here!