A three-year-old was sentenced to life in prison by Egyptian authorities, but regained his freedom when investigators realized they were actually looking for someone else.

When the ruling came down, the Karni family was shocked. Their son, at a ripe 3 years old, was sentenced to life in prison by the highest Egyptian military court.

Appearing on national television after the decision last week, father Mansour Karni broke down into tears. “Please promise me that my son and I can go home safe without being questioned by authorities,” he pleaded to the country’s assistant Minister of the Interior, who had called in to the show. Karni had been trying to get the government to correct the error since 2014, when the the child’s alleged crimes took place.

The incident has cast light onto the shortcomings of an Egyptian justice system that international human rights groups and governments have said is full of abuses. It was only after supporters took to social media and the child’s family took to television that the government admitted the sentence was the result of a clerical error and promised that it would be fixed.

Toddler Ahmed Mansour Karni’s supposed crimes were three murders and sabotaging public property. He was charged along with 115 other anti-regime protesters after a 2014 protest. He was 16 months old when the protests took place.

screen-shot-2016-02-24-at-5-58-16-pm

Protesters in Al Fayoum, a central Egyptian city, had taken to the streets to oppose the government as a constitutional reform was taking place. Clashes between the authorities and the protesters erupted and resulted in casualties.

EMAIL SUBSCRIPTION

Stay Updated

It’s still unclear how all of this led to a 3-year-old being sentenced to life in prison. (Some media have reported his age as four, but Karni’s mother said in a television interview that her son was 3 years and 5 months old.)

After he admitted there was an error in the case, Egypt’s assistant minister of the interior said that the government was looking for a 51-year-old male with a similar name as the toddler. Meanwhile, a spokesperson for the Egyptian military claimed in a Facebook post that it is looking for a 16-year-old that committed the crimes, also with a similar name.

Shortly after the alleged crimes, police came looking for the toddler, but ended up taking the father to prison for four months, instead of his son, Karni said in his television appearance.

The confusion led to sentencing the 3-year-old to life in prison in absentia.

“This case exemplifies the banality of repression in Egypt today,” Joe Stork, deputy Middle East director at Human Rights Watch, said earlier this week. “Police, prosecutors, and judges aren’t even bothering to check basic facts as they rush to pack defendants off to prison.”

Over the last few years, Egypt’s military-run government, led by President Abdel Fattah el-Sisi, has been criticized for its court system, which at one point gave the death penalty to 183 opposition members in a single sitting. During a visit to Cairo last year, Secretary of State John Kerry [http://john%20kerry%20egypt%20courts/]urged Egyptian leaders to crack down on human rights abuses, alluding to its court system.

Outrage over Ahmed’s story got international attention on social media, which in turn helped get his father on national television.

“I used to plea to God that someone would listen to me, now thanks to this,” father Karni said on this television interview. “Now, thanks to this [mass support], the entire nation of Egypt heard me.”