Mido has joined Zamalek on a season-long loan with a view to a permanent deal, the Egyptian giants have announced.
The 26-year-old, who began his career with the White Knights, will have the option of penning a permanent deal at the end of his loan period, but only if Zamalek meet Boro's terms.
Boro have picked up £4million for the initial switch with a further £1million to follow if the move is to be extended.
Zamalek spokesperson Sabri Serag told the club's official website: "Chairman Mamdouh Abbas exerted lots of efforts to wrap up the deal.
"We paid Middlesbrough £4million to acquire Mido's services. We can also sign him permanently next summer if we pay £1million to the English side."