A Palestinian student admitted to Harvard University has been barred from entering the United States because of political views expressed by his friends on social network Facebook, after being held for hours at Boston airport.

The student, Ismail Ajawi, who lives in Lebanon, told the student newspaper "The Harvard Crimson", that after arriving at Boston airport, police interrogated him for eight hours and asked him in particular about his religion.

After searching his phone and laptop for five hours, a policewoman began screaming at me, she said. "She found people on my list of friends putting anti-American political messages," he said.

He said he had not personally expressed any political views on social media, and said that the US authorities had nevertheless canceled his visa.

The US border police said they refused to allow Ismail Ajawi to enter, but made it clear that they could not give a specific reason because of the secrecy imposed on an individual file.

"This person was considered unacceptable on US soil based on information discovered during the inspection," said Michael McCarthy, a spokesman for the federal agency.

For his part, a State Department official said that "US law does not allow the refusal of a visa on the basis of political statements or opinions if these statements and opinions are considered legal in the United States."