Algeria pulled off a scrappy win-from-behind Monday, recovering from one goal down to beat Group C rival South Africa 3-1 in the Africa Cup of Nations tournament.

South Africa's Tokelo Rantie challenges Algeria's goalkeeper Rais Mbolhi during their Group C soccer match of the 2015 African Cup of Nations in Mongomo

South Africa’s Tokelo Rantie challenges Algeria’s goalkeeper Rais Mbolhi during their Group C soccer match of the 2015 African Cup of Nations. (REUTERS)

The Desert Foxes were stunned initially, in the 51st minute when Thuso Phala netted home a goal. But an own goal from Thulani Hlatshwayo tied the game in the 67th minute then started to shift the momentum toward Algeria.

Two more goals by Faouzi Ghoulam and Islam Slimani then wrapped up the win, putting Algeria atop Group C with 3 points.

In other group action, Senegal upset favorites Ghana 2-1, behind an added time goal from Moussa Sow. The match was tied at 1 up until the stoppage time, with Ghana’s André Ayew scoring first on a penalty in the 14th minute and Senegal’s Mame Biram Diouf heading home a close goal in the 58th minute.

The game appeared headed for yet another draw for the 2015 tournament, until Sow hit the left-side of the netting from the middle of the box at the 93rd minute.