The details regarding the contract has been released by whistle-blowing website Football Leaks (via Goal).
The La Liga giants were very keen to prevent Ozil from returning to La Liga in anything other than a white shirt.
A clause in the deal requires Arsenal to notify Real Madrid if an offer is made for the 27-year-old playmaker. The deal stipulates that Arsenal must offer Madrid outfit first refusal on the player, should a rival Spanish side make a move for his services.
The leak also revealed that Arsenal paid £36m for Ozil, less than the £42.5m fee reported by the club.
Arsenal missed out on topping the Premier League table after suffering a 1-0 loss against Chelsea in the London derby yesterday.
Mesut Ozil’s 100th game for the north London based club ended in a disappointing defeat. Arsenal have now slipped down to third place and are just two points ahead of their bitter rivals Tottenham.