A Ugandan maid who was sentenced to four years in jail for assaulting a toddler has been released, NTV Uganda reports.

According to her, the attack was revenge after she was beaten by the child’s mother.

But the mother denied beating her and the earlier charges of torture were dropped.

The maid was sentenced because she committed an "unjustifiable and inexcusable" crime, according to the Chief Magistrate Lillian Buchan.

She added that the sentence was appropriate in light of the "ruthlessness exhibited" on an "innocent, helpless child".

The video footage, which brought about the case, came from a camera the child's father, Eric Kamanzi, had installed in his home after realising that his daughter was bruised.

The video sparked outrage across the country at the time.