A four-year-old boy accused of multiple crimes, including four counts of murder, has been sentenced to life in imprisonment by an Egyptian court.

Ahmed Mansour Karmi was sentenced in absentia by a western Cairo court on Tuesday over crimes he allegedly committed when he was just one year old.

The boy had been accused of four counts of murder, eight of attempted murder, one count of vandalisation and one count of threatening soldiers and police officers.

The court claimed these crimes were committed during riots and demonstrations held on January 3, 2014, in support of Egypt’s ousted president President Mohamed Morsi.

Ahmed was among over a hundred other individuals listed as “wanted” for their alleged participation in similar crimes.

The boy’s defence attorney Faisal al-Saud argued his inclusion on the list was an accident, and presented the court with a birth certificate proving he was born in September 2012.

However, the certificate appeared to have not been transferred to the court and the presiding judge did not review the case before making the ruling.

Under current Egyptian law, Ahmed’s sentence cannot be appealed.

Locals have since taken to social media to criticise the Egyptian government and judicial system.

Lawyer Mohammed Abu Huraira has slammed Ahmed’s sentencing as “crazy”.

“There is no justice in Egypt. No reason. Egypt is ruled by a bunch of lunatics,” he said, The Independent reports .

Not-for-profit Amnesty International condemned the country’s criminal justice back in 2014, warning that it was “spiralling out of control”.

“In the space of a few short months, courts have made ready to sentence hundreds of people to death, jailed leading activists and protestors, including young women for protesting peacefully, and put journalists on trial for merely doing their job,” spokesman Salil Shetty wrote at the time.