Ayoub El Kaabi is mobbed by teammates after scoring his second goal in Morocco's 3-0 win over Zambia

Rabat (AFP) - Ayoub El Kaabi’s brace helped Morocco to a 3-0 win over Zambia on Monday as the Africa Cup of Nations hosts cruised into the last 16 while South Africa beat Zimbabwe 3-2 to also secure a berth in the knockout phase.

African player of the year Achraf Hakimi made his comeback from almost two months out injured for Morocco as Mali also qualified for the next round and Mohamed Salah was rested for Egypt’s 0-0 draw against Angola.

Morocco are the tournament favourites as the host nation and Africa’s top-ranked team but they were booed off by supporters following a 1-1 draw against Mali in their last outing.

Nevertheless, Walid Regragui’s team knew a win against Zambia at the Prince Moulay Abdellah Stadium in capital Rabat would guarantee their progress to the next round in first place in Group A and they outclassed their opponents.

Olympiakos striker El Kaabi nodded in an early opener and scored an overhead kick shortly after half-time, with both of his goals set up by the outstanding Azzedine Ounahi.

In between, Real Madrid attacking midfielder Brahim Diaz swept home Morocco’s second goal on 27 minutes at the end of a fine team move, again involving Ounahi.

Diaz has found the net in all three of Morocco’s games so far and he and El Kaabi join Algeria captain Riyad Mahrez on three goals at the top of the Cup of Nations scoring charts.

Captain Hakimi came off the bench in the 64th minute for his first appearance since suffering an ankle injury in action for Paris Saint-Germain at the beginning of November.

Morocco will stay in Rabat for a last-16 tie in the same stadium on Sunday against one of the best third-place finishers.

Oswin Appollis celebrates after scoring South Africa's winner against Zimbabwe as Bafana Bafana reached the Africa Cup of Nations last 16

“Scoring early on changes everything,” said Regragui. “We need to continue like this but not get carried away and keep our feet on the ground.”

Zambia go out and have now failed to win any of their 12 AFCON matches across four tournament appearances since lifting the trophy in 2012.

Mali go through in second place after a 0-0 draw with Comoros in Casablanca, a game they ended with 10 men after Amadou Haidara was sent off.

It was a third stalemate in as many matches for the Eagles, who will remain in Morocco’s largest city for a last-16 tie on Saturday.

- Salah rested by Egypt -

Earlier, Oswin Appollis converted a late penalty to give South Africa victory against Zimbabwe in Marrakesh as Bafana Bafana qualified for the knockout stage.

Rising star Tshepang Moremi gave South Africa an early lead with a deflected effort.

However, falling behind motivated Zimbabwe and they deservedly levelled on 19 minutes thanks to the individual brilliance of Tawanda Maswanhise from Scottish Premiership club Motherwell.

Maswanhise gained possession inside the South African half, dribbled past two opponents and fired the ball wide of goalkeeper Ronwen Williams into the far corner.

South Africa began the second period aggressively and regained the lead on 50 minutes through Burnley striker Lyle Foster, for whom it was a second goal of the tournament.

Zimbabwe brought it back to 2-2 on 73 minutes when Aubrey Modiba conceded an own goal, but Appollis then netted from an 82nd-minute penalty to give Bafana the lead for the third time, which they retained.

Egypt and Angola played out a 0-0 draw in Agadir as the Pharaohs finished on top of Group B

“Once again we fell asleep after a good start. We continuously lost possession,” said 73-year-old South Africa coach Hugo Broos.

“Our passing was bad at times and we should have concentrated on retaining possession in the closing minutes instead of seeking a fourth goal. We have to work on controlling games.”

Egypt, who rested stars like captain Salah with first place already assured, topped Group B with seven points after their draw against Angola in Agadir. South Africa finished with six points, Angola two and Zimbabwe one.

The last round of group games continues on Tuesday, with Tanzania playing Tunisia and Nigeria facing Uganda in Group C. Senegal take on Benin and the Democratic Republic of Congo play Botswana in Group D.