JERUSALEM — As a student at the University of Florida, Lara Alqasem served a recent stint as president of the tiny local chapter of Students for Justice in Palestine.

The group typically had a single-digit membership, and one of its more notable political activities appears to have been a campaign to boycott an Israeli brand of hummus. A Facebook event post indicated that all of 19 people showed up for the campaign’s launch.

But that seems to have been enough for the Israeli government to bar Ms. Alqasem from entering the country under a 2017 law intended to combat the boycott, divestment and sanctions movement, a loose network whose goals include pressuring Israel into ending the occupation of the West Bank. Israeli officials consider the B.D.S. movement to be anti-Semitic and bent on Israel’s destruction, since it also promotes the right of return for millions of Palestinian refugees to their former homes.

Ms. Alqasem arrived at Ben Gurion Airport last week with plans to enroll at an Israeli university, and has been held there since while she appeals a deportation order. On Tuesday, the Israeli government presented her with a choice: Apologize and renounce her support for the boycott movement, or give up on her plan to study in Israel and be placed on a plane back to the United States.