Israeli rights groups asked the High Court of Justice Sunday to overturn a law that bans Israelis from calling for a boycott of Jewish settlements in the West Bank. The court is expected to deliver its ruling in the coming months.

The 2011 law does not make a boycott call a criminal offense, but rather a civil issue that could trigger lawsuits demanding compensation. The law has not been tested in court, as no lawsuits have yet been filed, in part because the court itself froze implementation of the law due to appeals against it.

The collection of rights groups said the law infringes on the right to free speech while defenders of the law say it prohibits discrimination based on geography.

The appeal comes against a backdrop of an international boycott campaign against Israel’s settlement policies in captured territories claimed by the Palestinians. Israeli officials have derided the campaign as anti-Semitic since it holds Israel to a double standard.

In recent years, settlement opponents in Israel have joined broader boycotts of products made there. The Palestinians and most of the international community say settlements are illegal because they are built on war-won land that the Palestinians want for their future state.

Haggai El-Ad, head of the Association of Civil Rights in Israel, said that a boycott is a legitimate form of protest and that the Israeli law was politically motivated since it only applied to those targeting the settlements.

Deputy Foreign Minister Ze’ev Elkin, who initiated the bill, said the aim was to prevent discrimination against people based on where they lived. He said Israel has to defend itself against those aiming to harm it.

The issue of settlements, and the boycott threat against them, has figured prominently in the recently restarted US-mediated peace talks.

More than 550,000 Israelis live in the West Bank and East Jerusalem, contiguous areas captured in the 1967 Six Day War, among roughly 2.5 million Palestinians. Some Israelis see a big security risk in giving up the West Bank, which commands the highland over central Israel. Many religious Jews see it as their biblical heartland.

Times of Israel staff contributed to this report.