The president of George Washington University has personally apologized to a student who campus police had written up for violating school policy by flying a flag outside of his dorm window. The student at first believed that he was being discriminated against because he had been flying the Palestinian flag.

GW president Steven Knapp wrote in a statement to the university community late Thursday that he apologized to Ramie Abounaja, a 20-year-old junior biomedical engineering major from Exeter, N.H., who received an official warning letter from campus police for flying the Palestinian flag outside his Shenkman Hall dorm window. In an interview, Abounaja confirmed that he spoke on the phone with Knapp at about 6 p.m. Thursday, noting that the university leader was sympathetic.

The incident, on Oct. 26, was the result of a misunderstanding, Knapp said in his statement. University policy prohibits flying any banners or flags from dorm windows for safety reasons, he wrote. Knapp wrote that the police officer “had no idea what kind of flag this was,” and that Abounaja complied when asked to remove it.

But an automated system at the university triggered an official warning letter when the officer entered the incident into a computer system, and Knapp said the student “was understandably alarmed and believed that the warning was based on the fact that the object he had hung from his window was a Palestinian flag. That was not the case, but, again, it was perfectly understandable that the student would interpret the letter in the way he did.”

Initially, Abounaja said he believed that reprimanded was discriminatory.

Abounaja — a first generation American whose parents of Palestinian descent were born in refugee camps in Lebanon — said that he was inspired to fly the flag after seeing other students display flags outside their dorm windows.

“I would see them and say ‘Oh they are from California,’ or ‘they are from Argentina, that’s cool,'” said Abounaja, whose father is a car mechanic who owns his own repair shop. “I always was interested to see where people were from and I never knew it was against university policy.”

The advocacy group Palestine Legal responded to the incident this week by publicly alleging the university had violated civil rights laws by not allowing Abounaja to display the Palestinian flag, which is known for its distinctive red triangle and black, white and green horizontal stripes.

Those allegations came at a time of heightened sensitivity on the nation’s college campuses, both because students have been protesting perceived institutional racism and bigotry and because of fears of terrorism and campus violence that have led to tense lockdowns.

“It’s troubling that at a time when Islamophobic and anti-Arab sentiment is on the rise, GW is choosing to ignore its legal obligations to students,” Radhika Sainath, a lawyer for Palestine Legal, said in a statement. “GW must allow Ramie to express his identity and his viewpoint just as it does for any other student on campus without fear of law enforcement intervention.”

Knapp wrote in his statement Thursday that he is “committed to our doing everything we can to ensure that students of all backgrounds, nationalities, and beliefs feel welcome at this university and enjoy the fullest respect and support as they pursue the aspirations that brought them to George Washington in the first place.”

The reprimand has since been withdrawn from Abounaja’s record.

Knapp also wrote that he told Abounaja “that the university’s actions were in no way a response to his expression of his beliefs or opinions.”

Abounaja said that he was glad to speak with Knapp and that the president’s message was “above and beyond what I expected.”

The student said that for the moment he’s preparing for exams, including a final in organic chemistry on Monday.

Abounaja, who has ambitions to attend medical school, said that his Palestinian flag is still hanging in his dorm window, but this time on the inside.