Ahmad, 57-year-old, who goes by just a single name, won the CAF presidency by 34 votes to 20 in the poll, bringing to a surprise end the 29-year tenure of the 70-year-old Hayatou, who is from Cameroon.
The result was greeted by cheers at the CAF congress as Ahmad was carried on the shoulders of jubilant supporters to the podium after the result was announced.
But he offered voters a fresh face to a younger generation of soccer association presidents that have emerged.
Hayatou’s long career in soccer is now at an end, although he is still an International Olympic Committee member.
“It is not that bad,” Hayatou, who was first elected in 1988, told reporters as he departed the hall.
“I’m not a candidate who will serve his personal interests.
“African football cannot be managed by bandits,” Ahmad Ahmad said in a statement before the voting at a congress in Ethiopia took place.
He said: “I will reorganise CAF’s financial sector to make it accessible to all sectors and areas.
“Five million dollars, or 50 per cent of earnings from FIFA, will go to African federations.”