A military helicopter flies over an opponent of former Egyptian President Mohammed Morsi as he waves a national flag in this 2013 photo. (AP Photo/Amr Nabil)

The Egyptian military's mistaken conviction of a child for murder has highlighted its broad, ongoing crackdown on dissenters.

In the process of rounding up a group of more than 100 men involved in violent riots in 2014, an Egyptian judge accidentally sentenced a 4-year-old boy last week to life in prison, according to the BBC.

The child, Ahmed Mansour Qurani Ali, was convicted on four counts of murder and eight counts of attempted murder instead of a 16-year-old with a similar name, a military spokesman said, according to the BBC. The mistake was the result of a court's failure to check his birth certificate, the boy's lawyer said.

The admission from the Egyptian military, which rules the country, came after the story had already circled the globe, underscoring its sweeping crackdown on civil society groups, artists, activists and intellectuals in the three years since former President Mohamed Morsi was overthrown.

Most of the rioters convicted with Ali were supporters of the Muslim Brotherhood, Morsi's party.

Critics have accused the military of a brutal crackdown on dissent since Morsi's 2013 ousting. That crackdown has since extended to civil society groups, as The Washington Post's Erin Cunningham reported last May, and "artists, activists and intellectuals," as Cunningham reported earlier this month.

Even Secretary of State John F. Kerry weighed in, urging Egyptian authorities this summer to better target their campaign against anti-government militants.

“It is important to distinguish between those who use violence to achieve their ends and others who seek peacefully to participate in a political dialogue, even if what they say may sometimes make people uncomfortable,” Kerry said at the time.

Related stories:

Are coups good for democracy?

Egyptian court hands author two-year prison sentence for racy novel