(CNN) -- Slovenia edged out 10-man Algeria 1-0 in Sunday's World Cup Group C match at the Peter Mokaba Stadium in Polokwane.
A strike from Slovenian captain Robert Koren in the 79th minute found the net after the Algerian goalkeeper Faouzi Chaouchi made a clumsy attempt at parrying the ball away.
The result put Slovenia top of Group C with three points, ahead of England and the U.S. who shared a point on Saturday. Algeria are bottom.
Algeria were forced to play the last 20 minutes with 10 men after substitute Abdelkader Ghezzal was sent off for a second bookable offence on 72 minutes.
Ghezzal, a striker, had replaced Rafik Djebbour after 59 minutes and almost immediately received his first booking for tugging on Slovenian defender Marco Suler's shirt.
Barely 10 minutes later, Ghezzal deliberately hand-balled trying to reach a ball knocked forward from midfield, leaving the referee no option but to show him a red card.
Until Ghezzal's sending-off, Algeria looked the better of the two teams, showing more initiative going forward than the more defensively-minded Slovenian team.
The first half produced little quality and even fewer chances as both teams struggled to make an impact. Algeria came close in the 36th minute when defender Rafik Halliche narrowly headed wide from a corner.
Slovenia's only chance of the half came moments before interval when midfielder Valter Bisra fired a fierce shot on target, but it was easily tipped over by Chaouchi.
Slovenia's next match is against the United States on Friday in Ellis Park, Johannesburg, while Algeria will face England the same day at the Green Point Stadium in Cape Town.