Mahlambi was linked with a move to Absa Premiership champions Mamelodi Sundowns, but any switch has now been ruled out after he was registered by the Red Devils for the upcoming Egyptian Premier League season.
The 20-year-old winger was on the brink of an exit after Al Ahly had exhausted their foreign quota ahead of their registration deadline on August 1, with the club reportedly considering offers for the former Bidvest Wits star.
Reports in Egypt suggested the club were open to selling Mahlambi, who would have been frozen out of domestic competitions and their CAF Champions League campaign.
However, following a knee injury picked up by Nigerian striker Junior Ajayi that has ruled him out for up to four months, 'Phaka' was drafted into coach Patrice Carteron's 33-man squad at the last minute.
This means the School of Excellence graduate will now remain with the record eight-time African champions at least until January, but he will be hoping to establish himself in the setup to earn Patrice Carteron's faith.
Last season Mahlambi managed one goal and five assists in 15 appearances under former coach Hossam El-Badry, after arriving from The Clever Boys in September.
Meanwhile, former Wits loanee Amr Gamal has been left out of the registered squad, following his return from a second loan spell in Finland, as he nears an exit from the club.