The ward became vacant after councillor Andile Lili resigned.
ANC Western Cape interim provincial committee co-ordinator Ronalda Nalumango said: “We are encouraged by the result, which shows that our supporters still trust us.
"We know that there is a lot of hard work ahead of us but we are grateful to our voters for trusting us.”
The Electoral Commission of SA (IEC) said the ANC retained the seat it won in the 2016 municipal elections, with 76.67% of the votes cast compared to 82.54% in the 2016 municipal elections.
Voter turnout was 29.79%, the IEC said.
Meanwhile, the DA retained its ward 5 in Knysna, which was hotly contested by five candidates.
The party retained the seat it won in the 2016 municipal elections, with 40.52% of the votes cast compared to 74.31% in the 2016 municipal elections. Voter turnout was 58.83%.
DA Western Cape leader Bonginkosi Madikizela said: “We are humbled by the support we received in Knysna, despite the many challenges we are facing in that municipality.
"I believe that this win for the DA shows that the majority of Knysna residents have faith in us and we must focus on addressing the challenges.”
Knysna activist Mike Hampton said the DA lost half its voters despite campaigning by Premier Alan Winde, DA federal finance chairperson Dion George and police spokesperson Dianne Kohler-Barnard.
Nalumango said although the ANC had lost a by-election in Rheenendal, it was encouraged by an increase in support.