Three weeks after a 10-year-old Alexandria boy was arrested for showing a toy gun to another student on a school bus, prosecutors dropped charges against the child Tuesday, and his record was scrubbed clean.

“We did not feel it was appropriate or productive to proceed with criminal prosecution and believe the matter can be best handled administratively within the school system,” said Alexandria Commonwealth’s Attorney S. Randolph Sengel.

The child’s mother, Nakicha Gilbert, said that she was glad her son’s courtroom travails had ended but that “it should’ve never happened” in the first place.

The fifth-grader at Douglas MacArthur Elementary School in Alexandria was arrested this month after he showed a cheap fake gun with an orange tip to another boy on the school bus. A girl on the bus saw the toy gun and later told her mother that she was scared; the girl’s mother then called school leaders. The next day, school officials searched the boy’s backpack, found the toy gun and called police.

He was fingerprinted, photographed and brought before a court Feb. 5, charged with brandishing a weapon.

“It’s like three weeks out of our lives that could have been avoided,” Gilbert said.

The incident came as the nation continues to deal with the fallout from the mass shooting at Sandy Hook Elementary School in Newtown, Conn., a tragedy that has spawned widespread discussion about school safety.

The Alexandria 10-year-old’s ordeal gained attention as other disciplinary cases reflected a heightened sensitivity about guns, including local instances of students getting in trouble for pointing their fingers like guns while playing.

Gilbert said she told her son that the uproar over the toy gun happened because of a larger concern in the world about “everything that’s going on with real guns in the schools.”

“It’s not like we don’t understand that guns are bad,” she said. “We do. . . . But you’re doing all of this for a toy? They overreacted — badly.”

Gilbert said her son did not point the gun at others or intend to scare anyone. “He’s just ready for it to be over,” she said.

The boy has been transferred to another school, at his mother’s request, but Gilbert is still working with lawyers to get his disciplinary record cleared. He was suspended 10 days, with a recommendation for expulsion. But the punishment was cut short, and he ultimately missed six days of classes, his mother said.

Alexandria school officials did not comment on Tuesday’s dismissal of charges but noted that the weapons charge refers to objects similar in appearance to firearms. School officials said parents have a right to request expungements of disciplinary records.

Melinda Douglas, public defender for the city of Alexandria, said that in spite of the resolution, important questions remain about how the case was handled. She said that “thought and care” should have been taken before charges were brought and that it should not have taken three weeks for the case to be dismissed. “It’s not all’s well that ends well,” Douglas said. “I think people have to be mindful that it really affects the child.”