Walias defeated Mali playing the last 30 minutes with 10 men.
Bakary Sako, who plays in the English Championship, gave the hosts the lead after 32 minutes but that was cancelled out just 4 minutes later by Oumed Oukri.
Getaneh Kebede was hero and villain for Ethiopia – first giving his side the lead on the stroke of half-time but then getting him sent off 12 minutes after the break.
Mali made the extra man tell and equalized through Mohamed Yatabare with 20 minutes left to play.
But in the final minute Walias’ defender Abebaw Butako scored to give his side a vital three points.
Overall Algeria have a maximum 12 points guaranteeing them a top two finish, Mali stay second despite losing on six points while Malawi and Ethiopia both have three.
The top two from each group and the best third-placed side qualify for the tournament in Morocco, AFCON2015.