It was the first time Lara Alqasem has appeared in public since she was stopped at Ben-Gurion Airport outside Tel-Aviv on 2 October.
The US citizen is fighting an expulsion order over her alleged involvement in the pro-Palestinian boycott movement against Israel.
Ms Alqasem, 22, appeared calm during the hearing, remaining quiet and staring straight ahead.
The court has already rejected Ms Alqasem’s first appeal for immediate release from the immigration facility. She will remain in detention until the court delivers its written verdict in the coming days.
“I think we have a good case,” said her lawyer Yotam Ben-Hillel. “The state’s argument and evidence was weak, but I’ve learned not to be optimistic.”
The American graduate student, whose father is Palestinian, arrived in Israel with a valid visa and was registered to study human rights at Jerusalem’s Hebrew University.
But she was barred from entering the country and ordered deported, based on suspicions that she is an activist for the pro-Palestinian boycott movement.
She has spent the week in a confined area with a bed infested with bedbugs, people who have been in contact with her told Al Jazeera.
The Israeli authorities said that Ms Alqasem is not being held against her will and is free to leave the country. The country enacted a law last year banning entry for any foreigner who “knowingly issues a public call for boycotting Israel.”
Ms Alqasem is a former president of the University of Florida chapter of Students for Justice in Palestine. The group is a branch of the BDS movement calling for boycotts, divestment and sanctions against Israel.
Asher Fredman, a senior official in the Strategic Affairs Ministry, said that Ms Alqasem was being denied entry because of her past activities, not her opinions.
“We have clear criteria,” he said. “We believe that Miss Alqasem meets those criteria based on her actions, and the actions of the organisation of which she was a senior leader over several years.”
Ms Alqasem’s lawyer said that she is no longer engaged in BDS activity, and has promised not to promote it in the future. Mr Ben-Hillel told the court on Thursday his client had come to Israel to learn Hebrew and study human rights issues.
The lawyer said she stopped BDS activity in April 2017, according to The Jerusalem Post. But state prosecutor Yossi Zadok said Israeli authorities had information showing she posted her intent to attend BDS events earlier this year on Facebook.
Jewish groups in the US, as well as Israeli academics, have flocked to her defence.
Earlier this week more than 300 academics signed an open letter calling for the US citizen to be allowed to continue her studies in Jerusalem.
It read: “Denying entry to foreign students based on political beliefs or ethnic heritage is an attack on academic freedom.”
More about: Israel