Cell phones and WiFi information helped identify four teens who vandalized their Maryland school with spray-painted swastikas and racist and homophobic slurs, according to a Washington Post report.

>> Read more trending news

Seth Taylor, Tyler Curtiss, Joshua Shaffer and Matthew Lipp were each charged with vandalism, destruction of property and a hate crime in May 2018, The Post reported. The four covered their faces when they used spray paint to draw swastikas and write racist and homophobic slurs on the exterior of Genleg High School, where they were seniors.

The school is the only majority white high school in the county, and Principal David Burton is African American. Some of the graffiti named Burton and called him a racist slur, The Post reported.

Taylor told The Post that they were originally going to spray paint "Class of 2018" on the sidewalk, but that "things got out of hand."

The four may have remained unidentified had their phones not automatically connected to the school's WiFi system, The Post reported. Students use individual IDs to log into the school's WiFi system. Each teen had their cellphone on them when spray-painting the school, and each phone automatically connected to the WiFi. Authorities were able to see who accessed the WiFi at the time the vandals were caught on security cameras.

Each of the teens received jail sentences of differing lengths that were served on the weekendsThey were also sentenced to probation and community service. All four will be eligible to have their hate crimes expunged from their record when they complete probation.