Two-time defending champion Egypt hammered eight-man Algeria 4-0 in a tense match to advance to the final of the African Cup of Nations Thursday. Hosni Abd Rabou converted a 37th-minute penalty and Mohamed Zidan doubled the lead with a left-footed shot from 15 yards. Substitute Mohamed Abdel Shafy made it 3-0 in the 80th from a tight angle. Mohamed Gedo scored the fourth in injury time. Rafik Halliche, Nadir Belhadj and goalkeeper Faouzi Chaouchi were all separately sent off. In Sunday's final, Egypt will play Ghana, which beat Nigeria 1-0 in the other semifinal. The two losers will play for the third spot Saturday. The win was Egypt's first over its north African rival in the continental championship. It also extended the Pharaohs' unbeaten run in the tournament to 18 games. There was a major police presence at Benguela's all-seat stadium, where rival fans were kept apart from each other by a wall of police wearing riot helmets and wielding batons. In November, three Algerian players were injured after their team bus came under attack from stone-throwing Egyptian supporters ahead of a World Cup qualifying match. Algeria eventually beat Egypt in a playoff to qualify for the World Cup. In Luanda, Ghana reached its first African Cup of Nations final in 18 years after Asamoah Gyan scored to secure a 1-0 win over Nigeria. Gyan broke the deadlock in the 21st minute against the run of the play with a header at the near post from Kwadwo Asamoah's corner to send the Black Stars into the biennial tournament's final for the first time since 1992. Gyan also scored the winner in Ghana's 1-0 win over Angola in the quarterfinals. Nigeria dominated from the start and created a number of good chances but was unable to break down Ghana's rock-solid defense. Ghana coach Milovan Rajevac made one change from the team that beat host Angola in the quarterfinals, bringing in Anthony Annan for Haminu Draman after the midfielder recovered from a thigh injury. Nigeria striker Obafemi Martins, who replaced Yakubu Ayegbeni in the starting lineup, had a good chance in the opening minute when he was set up in the box by Peter Odemwingie but failed to reach the ball. Ghana forward Andre Ayew then went close when he backheeled Lee Addy's cross wide in the 9th minute before Gyan gave his side the lead. Nigeria, which last reached the tournament final in 2000, continued to creating half chances until the end but couldn't breach Ghana's defense. Mali sacks coach Mali has sacked its Nigerian coach Stephen Keshi following the country's group-stage exit from the 2010 Africa Cup of Nations, the Malian football federation announced Thursday. The decision, taken Wednesday, was in direct response to Mali's poor showing at the tournament in Angola, where Mali drew 4-4 with the host, lost 1-0 to Algeria and beat Malawi 3-1. Keshi took up the post in April 2008 with the stated aim of qualifying Mali for the Africa Cup of Nations and the 2010 World Cup, which he failed to do.