D.C. Attorney General Karl A. Racine on Friday said an investigation found that a 10-year-old boy shown in a video that went viral after he was handcuffed by police and accused of robbing another youth near Union Station is innocent and that he will not be charged with a crime.

Racine, whose office prosecutes juvenile offenders, said that, after reviewing surveillance video, “we are now certain that there is no evidence that the 10-year-old boy played a role in the armed robbery. He is totally innocent.”

Information in juvenile court is protected by law, and the courts and Racine’s office rarely publicly discuss the cases. In a statement, the attorney general said he obtained a court order to discuss the boy’s case to ensure the public knew the child had been cleared.

At the time of the boy’s detention, police said they were acting on accounts from witnesses and a 12-year-old victim who had his cellphone stolen after being beaten in the face and threatened with a pellet gun that resembled a semiautomatic pistol.

The crime took place March 30 in the 200 block of Massachusetts Avenue NE.

Police also arrested a 13-year-old in the robbery, whose case they would not discuss. Police previously had said they released the 10-year-old to his mother’s custody shortly after he was detained with a summons for him to appear before juvenile authorities.

A D.C. police spokesman declined to comment on Friday.

The attorney general’s statement said police correctly followed protocol when officers handcuffed the 10-year-old.

The video that shows police handcuffing the 10-year-old sparked a discussion over the detention of someone so young and of the alleged robbery.

“In the court of public opinion this innocent 10-year-old was deemed guilty and criminalized. . . . We owe it to the young victim of this crime to hold the people who hurt him accountable,” Racine’s statement said. “We also owe it to the 10-year-old who was incorrectly identified as an armed robber to set the record straight.”