Mali's skipper pounced on a late goalkeeper mistake to give his troubled West African nation the first victory of the tournament on Sunday.
The Group B match was heading for the fourth straight draw of the Africa Cup before Keita poked home after Niger 'keeper Kassaly Daouda spilled a cross in the midst of a bunch of players in the 84th minute.
After the game, Keita wore a white T-shirt with the words "Peace for Mali" spelled out in red letters in French when he received his man of the match award. The slogan was in reference to the ongoing conflict in his homeland.
Niger had been resilient at Nelson Mandela Bay Stadium, but Mali had earlier chances to win as Keita's fierce drive in the 54th was just saved by Daouda and the skipper then hit the crossbar in the 77th with a left foot curler from near the edge of the area – this time with Niger's goalkeeper beaten.
Between Keita's chances, substitute Mahamadou Samassa broke open the Niger defense with his trickery and thudded a shot into the side netting. Mahamane Traore missed badly with a free header before Keita finally got his goal and the first triumph of the 2013 Cup of Nations for his country.
Mali's hard fought and late win now puts it top of Group B after one of the pre-tournament favorites, Ghana, blew a 2-0 lead to draw 2-2 with Congo in the first game in Port Elizabeth on Sunday.
The countries meet next in a familiar rivalry having played each other twice at the 2012 Africa Cup of Nations – and with a place in the quarterfinals in 2013 in the balance. "We all know that we have to make a fantastic game against Ghana," Mali coach Patrice Carteron said.
"If we can make it [win] we know we will be qualified. Mentally we have to be strong." Keita's left-foot shot from distance 10 minutes into the second half kicked off a period of prolonged pressure from the Malians, which finally paid off when Keita was perfectly placed to score from Daouda's telling mistake.
The goalkeeper was on his knees with his head in his hands after the decisive error, but was backed afterward by his coach Gernot Rohr, and opposite coach Carteron. Niger launched occasional counterattacks but tried to defend for much of the 90 minutes in the hope of gaining a point from its opening game.
Forward Mohamed Soumalia had one of the few chances for Niger but couldn't connect properly with a cross from the left just before Keita's goal. Rohr said saw enough spirit from his team to think it could still make the quarterfinals – despite being the only team so far to lose at the tournament.
"The players did their best," he said. "When you have players with a fighting spirit and big hearts, you can be happy even when you lose." – Sapa-AP