Ismail Ajjawi, a 17-year-old Palestinian student living in Lebanon had big plans to study medicine this fall at Harvard University but claims he was blocked from entering America because of his friends' social media posts.

Akkawi was refused entry into the U.S. after he landed Friday at Logan International Airport in Boston, university and federal officials told the Associated Press this week. The freshman said the denial had to do with politically oriented social media posts by his friends.

U.S. Customs and Border Protection (CBP) spokesman Michael McCarthy said that the decision to cancel Ajjawi’s visa was based on information discovered during an inspection, but did not specify what that information was. McCarthy added that Ajjawi was not deported, meaning he still could seek reentry.

DC CONSULTANT'S ALLEGED AFFAIR WITH ILHAN OMAR IS FRONT AND CENTER IN DIVORCE PAPERS

Harvard has been working to resolve the matter, university spokesman Jason Newton said. AMIDEAST, a nonprofit organization that awarded Ajjawi a scholarship, was providing legal assistance.

Ajjawi told The Harvard Crimson student newspaper that federal agents detained him at the airport for eight hours, searched his cellphone and laptop, and questioned him about his friends’ social media posts.

A Palestinian student trying to start classes at Harvard University was denied entry to the U.S. (iStock, File)

A Palestinian student trying to start classes at Harvard University was denied entry to the U.S. (iStock, File)

The posts included “political points of view that oppose the U.S.,” Ajjawi said in his written statement.

“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 [the agent] that I shouldn’t be held responsible for what others post,” he added.

Ajjawi told The Crimson he still hoped to join his classmates in time for the start of classes Tuesday. His family has lived in a camp for Palestinian refugees in the port city of Tyre in southern Lebanon

In an Al-Araby TV interview that aired Friday as his son was flying to the U.S., Bassel Ajjawi had this message for his son: “I am very proud of you and hope you will be an exemplary representative of the Palestinian people abroad.” Bassel Ajjawi has declined to comment beyond his son's statement to the Crimson.

STATE PROBE FINDS OMAR VIOLATED CAMPAIGN FINANCE RULES --- AND UNCOVERS TAX FILINGS THAT RAISE NEW LEGAL QUESTIONS

Searches of electronic devices and social media at border points were conducted under previous administrations, but free speech groups complain they have been stepped up since President Trump took office in 2017.

The Trump administration says the enhanced searches are critical to prevent extremists from entering the country.

CLICK HERE TO GET THE FOX NEWS APP

International students and university instructors are dealing with “postponements and disruptions for what have previously been routine immigration processes such as family visas, renewals of status, or clearance for international travel,” Harvard University President Lawrence Bacow wrote in a July letter to Secretary of State Mike Pompeo and acting Secretary of Homeland Security Kevin McAleenan.

The State Department issued just 362,929 student visas in fiscal year 2018, down more than 43 percent from the 644,233 student visas issued in fiscal 2015, according to department data.