A public school in Maryland is investigating why a Nazi flag was found hanging in a classroom window during the weekend.

The Nazi flag was spotted by the people who were attending a basketball match on the campus of Governor Thomas Johnson High School in Frederick. The photos of the flag became viral online and when the Frederick County Public school officials were notified of it, they took down the flag immediately.

In a statement released, Frederick County Public School's superintendent Theresa R. Alban said that the Nazi flag was left hanging after being used in a World War II history class.

"The values of FCPS are in direct contrast to the message represented by that flag, and we apologize that the display of this flag caused hurt in our community," the statement obtained by news outlets said.

The officials would conduct an investigation to figure out what led to the flag being hung up in the window and take appropriate action to ensure that such an incident is not repeated, Alban said in the statement.

The school’s principal, Daniel Lippy, too said in an email that the administration would take steps to prevent this from occurring in the future.

"The flag was removed as soon as our administrators were made aware. An apology was sent to the community," Alban told WTTG-TV. “This does not reflect the values of our school system.”

The photo of the flag went viral after a person who claimed to be a graduate of the district, posted it on Facebook saying, the flag was seen during one of the most important sports events of the district, NBC News reported.

"What culturally proficient educator has a 'life' size Nazi flag in their tool kit and then has the audacity to hang it OVER THEIR CLASSROOM WINDOW IN THE FRONT OF THE SCHOOL BUILDING BY THE MAIN ENTRANCE," she wrote on Facebook with the photo of the flag.

Nazi Flag
Pictures of Nazi flag sticking out from an Australian army vehicle deployed in Afghanistan were vehemently condemned by Australia's Prime Minister Malcolm Turnbull. In this photo, an American Nazi party member arrives carrying a Nazi flag for an American Nazi rally at Valley Forge National Park in Valley Forge, Pennsylvania, Sept. 25, 2004. Getty Images/ William Thomas Cain