An incoming Harvard freshman from Palestine was allegedly interrogated by immigration officials for five painstaking hours then had his visa rescinded after landing in Boston because they found his friends on social media shared anti-US political posts.

Ismail B. Ajjawi, a 17-year-old Palestinian student who lives in Tyre, Lebanon, landed at Boston Logan International airport on Friday night in anticipation of starting his freshman year at Harvard University.

But his Ivy League career, in which he intended to study in Chemical and Physical Biology, ended before it even began when his visa was revoked and he was deported back home.

Ajjawi said that after landing, immigration officers subjected him hours of questioning and searched his phone and computer, and confronted him about his friends' social media posts sharing their political views that spoke against the U.S., he said to school newspaper the Harvard Crimson.

Incoming Harvard University freshman Ismail B. Ajjawi, a 17-year-old Palestinian refugee living in Lebanon, had his visa revoked hours after landing in the U.S. Friday night

Ajjawi says he spent a total of eight hours in Boston, which has nearest airport to the Cambridge, Massachusetts university, before he was forced to leave.

After landing he and several other international students faced questioning from immigration officials. But Ajjawi was held back while his peers were allowed to go.

He alleges that an immigration officer continued to question him about his religion and religious practices in Lebanon. That officer then asked the student to unlock his phone and laptop and searched them for five hours, Ajjawi alleges.

The officer then asked him about his friends’ social media activity saying she found posts sharing political views that were against the US.

'When I asked every time to have my phone back so I could tell them about the situation, the officer refused and told me to sit back in [my] position and not move at all,' Ajjawi said.

'After the 5 hours ended, she called me into a room, and she started screaming at me. She said that she found people posting political points of view that oppose the US on my friend[s] list,' he added.

Ajjawi replied saying that the political posts were not his own.

'I responded that I have no business with such posts and that I didn't like, [s]hare or comment on them and told her that I shouldn't be held responsible for what others post,' he said.

'I have no single post on my timeline discussing politics,' he added.

Despite his defense, the immigration officer canceled Ajjawi's visa and told him he would be deported. Ajjawi was allowed a phone call to his parents before he returned to Lebanon.

Ajjawi is now in Lebanon and in contact with a lawyer and the university with the hopes of resolving his visa before classes start next Tuesday September 3.

U. S. Customs and Border Protection told the Crimson they found Ajjawi 'inadmissible' to the country.

'Applicants must demonstrate they are admissible into the U.S. by overcoming ALL grounds of inadmissibility including health-related grounds, criminality, security reasons, public charge, labor certification, illegal entrants and immigration violations, documentation requirements, and miscellaneous grounds,' the statement said.

'This individual was deemed inadmissible to the United States based on information discovered during the CBP inspection.'

Harvard says they're in contact with the family and working to bring him back to campus.

'The University 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,' a university spokesman said.

Harvard's International Office employs immigration lawyers who work to resolve visa-related issues international students encounter. Ajjawi says he's been in contact with Harvard International Office Director of Immigration Services Maureen Martin.

He was coming to Harvard on a scholarship given by AMIDEAST, a nonprofit, which is now aiding him with legal assistance.

Harvard Admissions did not immediately return DailyMail.com's request for comment.

Ajjawi says he was held at the Boston Logon international airport for eight hours and allegedly questioned for five hours, before immigration officials rescinded his visa and deported him

His deportation has sparked outrage among his friends.

'Deporting him back is of course unfair act, he is a very clever student and it is not appropriate to act with him this way,' Ajjawi's friend Selah Chehade said to DailyMail.com.

Ajjawi's revoked visa comes after the bright student was highlighted on a local news site Alaraby Entertainment about his success story, from being a refugee in Lebanon to getting into the coveted Ivy League school on a full scholarship.

'This was always my goal; I did everything with this goal in mind, including managing my time wisely and studying as much as I can,' Ajjawi said in the news video.

'My plan is to become a doctor. I’m going to major in Chemical and Physical Biology at Harvard, as a pre-med student, and then I will go on to medical school,' he added.

'My success, that of a Palestinian refugee in Lebanon, shows that Palestinians can be high achievers and attain success, despite their circumstances.'

His father was also included in that news cast, who proudly gushed about his son's success saying: 'This was a very happy moment for us, that all of his hard work paid off. Despite the severe hardships that the Palestinian people face, we are achieving high success.'

'I'm so proud of him and God willing he will be a good representative and example for Palestinians abroad.'