A group paints the exterior of the Ashburn Colored School. (Bill O'Leary/The Washington Post)

When five boys spray-painted a historic black school in Ashburn, Va., with swastikas, “WHITE POWER” and vulgar images, they were motivated more by teenage naivete than by racial hatred, a Loudoun County prosecutor concluded.

Three of the boys are minorities themselves, and one also marked the walls with “BROWN POWER.” None had previous troubles with the law.

So Deputy Commonwealth’s Attorney Alex Rueda prepared an unusual sentence recommendation meant to educate them on the meaning of hate speech in the hope that they come to understand the effect their behavior had on the community.

The boys, who are all 16 or 17, have been sentenced to read books from a list that includes works by prominent black, Jewish and Afghan authors, write a research paper on hate speech, go to the U.S. Holocaust Memorial Museum and listen to an interview with a former student of the Ashburn Colored School, which they defaced. The school taught Loudoun County’s black children from 1892 until the 1950s, a period during which they were barred from attending school with white students.

The five teens pleaded guilty this week to destruction of property and unlawful entry before Judge Avelina Jacob in Loudoun County Juvenile and Domestic Relations District Court.

Rueda said the boys could benefit from understanding the devastating power of hate speech.

The daughter of a former librarian, Rueda said she learned about the world through books.

Police said the boys went to the building late Sept. 30 with spray cans and defaced the aging facade of the historic school.

“It really seemed to be a teachable moment. None of them seemed to appreciate — until all of this blew up in the newspapers — the seriousness of what they had done,” Rueda said.

The boys targeted the building because it is owned by the Loudoun School for the Gifted, and one boy had left the private school on unfavorable terms, Rueda said. “So it really seemed to be an opportunity to teach them about race, religion, discrimination, all of those things.”

Before the vandalism, students at the Loudoun School for the Gifted had been working to restore the site so it could serve as a sober reminder of the county’s segregated past.

The slurs painted there devastated the students who had started the meticulous restoration work and were raising money through bake sales and yard sales to fund the project.

Deep Sran, founder of the Loudoun School for the Gifted, said he felt the sentence was appropriate.

He said he was especially pleased that the order includes listening to an interview with Yvonne Thornton Neal, one of the Ashburn Colored School’s former students.

“We thought it would be good to really understand the story of Ms. Neal and the local community and why it was so important to them,” Sran said.

The vandalism occurred during a contentious election season, stoking fears that racial tension in the suburban D.C. community was growing.

An outpouring of support followed from community members who volunteered on a “community restoration day” to help undo the damage and from people around the world who donated through a GoFundMe page, giving more than $60,000. Washington Redskins owner Daniel Snyder pitched in an additional $35,000.

Rueda’s reading list includes “The Beautiful Struggle,” the memoir of Ta-Nehisi Coates; and “Night,” Elie Wiesel’s searing account of Auschwitz. She also included two works by Afghan author Khaled Hosseini and other important works by Alice Walker and Toni Morrison.

The boys are also sentenced to write a report that will be “a research paper explaining the message that swastikas and white power messages on African American schools or houses of worship send to the African American community as well as the broader community, which includes other minority groups.” They also must write reports on the books they read.

If the boys complete their sentences, their cases will be dismissed.