The Tel Aviv District Court on Friday said Israel’s decision to ban BDS supporter Lara Alqasem from taking part in a Hebrew University study program was legal, and that “any self-respecting state defends its own interests and those of its citizens, and has the right to fight against the actions of a boycott … as well as any attacks on its image.”

Alqasem, former president of the University of Florida chapter of Students for Justice in Palestine, was found to have taken part in support for the “boycott of Israeli society” and for enemies of Israel.

The 22-year-old American, the granddaughter of Arabs who had lived in Israel, landed at Israel’s Ben-Gurion International Airport on Oct. 2 on a student visa, having registered for a one-year program on human rights at Hebrew University of Jerusalem.

But she was not allowed to enter the country, after entry officials found she was an activist in the movement to boycott Israel. She rejected deportation, opting to stay at an immigration facility while she fought the entry ban. She remains free to go back to the United States.

Hebrew University, which had supported her appeal, condemned Friday’s decision.

On Thursday, Alqasem appeared in court to oppose the ban, but the judge found the entry ban to be in accordance with a law passed last year banning foreigners who “knowingly issue a public call for boycotting Israel.”

The university criticized the court’s decision, saying her registration in the program itself negated the concept of boycott.

Alqasem’s lawyers sent a letter to Public Security Minister Gilad Erdan, promising she would not participate in boycott activities while studying in the country, but Erdan rejected the plea, saying her letter actually verified that she supports the boycott and isolation of Israel.

“I want those boycott activists to understand that their actions come with a price,” said Erdan. “I am not putting them in jail, not doing anything physically to them, but they will not enter Israel, gather information and misrepresent it around the world.”

“The ruling stated explicitly that the decision was based on Alqasem’s activities and actions against the State of Israel and not due to her opinions or thoughts,” Erdan added, noting that the judge said the ruling would not affect every student who supports a boycott of Israel “because not every student serves as the president of a branch of a prominent boycott organization and tries to hide such by erasing their social-media accounts.”

He rejected the idea that the decision would harm Israel’s image, stating “every day, thousands of people are stopped at the entrance to the United States and Britain, and nobody in the hypocritical international media writes articles about it or questions [authorities] on why they decided it will maybe harm national security.”

The United States said last week that while it is in touch with Alqasem and supports freedom of expression, it supports Israel’s right to decide whether she could stay.