Immigration officials revoked a Palestinian Harvard freshman’s visa on Friday after an agent allegedly screamed at him about his friends’ political social media posts.

Ismail B. Ajjawi told the Harvard Crimson that U.S. Customs and Border Protection agents pulled him aside for hours of questioning upon his arrival at the Boston airport from his home city of Tyre, Lebanon.

A CBP spokesperson emailed a statement to TPM saying that Ajjawi was found “inadmissible” during the inspection but did not offer specifics.

According to Ajjawi, one of the officials detained him for eight hours and interrogated him about his religious practices in Lebanon. During the final five hours of the session, the agent allegedly left the room to examine his phone and laptop after asking the student to unlock the devices.

At the end of the session, the agent called Ajjawi into her office and allegedly began “screaming” at him over his friends’ social media posts, according to Ajjawi.

“She said that she found people posting political points of view that oppose the U.S. on my friend[s] list,” Ajjawi told the Crimson.

The student said that though he himself didn’t have any political posts on his social media timelines, the immigration official revoked his visa and sent him back to Lebanon anyway.

Harvard spokesperson Jonathan L. Swain told the Crimson that the school is “working closely with the student’s family and appropriate authorities to resolve this matter so that he can join his classmates in the coming days.”