(Reuters) - Police arrested a 17-year-old boy on Friday over a racist threat of violence posted online that prompted authorities to close all the schools in Charlottesville, Virginia, for two days.

Slideshow ( 4 images )

The boy, who has not been publicly identified, was charged with threatening to cause bodily harm on a school property, a felony, and harassment by computer, a misdemeanor, police said in a statement.

City leaders have worked to ease racial tensions in the city since a white nationalist rally in August 2017 descended into violence, with a white nationalist killing a counter-protester and injuring others after he drove into a crowd.

The threat against Charlottesville High School was reported to the police on Wednesday afternoon, according to the police department.

School officials then quickly decided to close all schools in the city. According to U.S Census Bureau data, African Americans make up around 19 percent of Charlottesville’s population of nearly 50,000 people.

“We would like to acknowledge and condemn the fact that this threat was racially charged,” Charlottesville City Schools said in a letter sent to parents and posted on its website on Thursday evening notifying them of Friday’s closures. “The entire staff and School Board stand in solidarity with our students of color.”

The Richmond Times-Dispatch reported that a person claiming to be a student at Charlottesville High School, one of the region’s largest schools, warned white students to stay at home so they could shoot dead non-white students in an act of “ethnic cleansing.”

The boy arrested on Friday is not a student at any of the city’s schools, the Times-Dispatch reported, citing the schools superintendent.

There was widespread condemnation for the white nationalists involved in the violence in Charlottesville in 2017.

But U.S. President Donald Trump drew strong criticism in the days after the Charlottesville rally for equating white supremacists with counter-protesters and saying he thought there were “fine people” on both sides.