After the 2004 AFC Asian Cup, Mahmoud signed for Qatar Stars League club Al-Khor. In the 2004–05 Qatar Stars League, Al-Khor finished in 3rd place and Mahmoud scored 19 goals, the 3rd-highest amount in the league. He broke three records in one game in an 8–0 victory over Al-Shamal. Having scored 6 goals in the match, he became the only player to have scored two hat-tricks in a single league match. He also scored the fastest goal in a league match, taking 30 seconds to score after the game had started. Furthermore, he was the only player that season to score three goals in each half against two different goalkeepers. He assisted in the two other goals in the match. Al-Khor were knocked out of the 2005 Emir of Qatar Cup at the quarter-final stage, losing on penalties to Al-Sadd after a 2–2 draw in which Mahmoud scored. Al-Khor won the Qatar Crown Prince Cup though with Mahmoud scoring 4 goals in that competition including 2 goals in the final which Al-Khor won 2–1.