It’s not just Israel’s adversaries who find the movement appealing. Many devoted supporters of Israel, including many American Jews, oppose the occupation of the West Bank and refuse to buy products of the settlements in occupied territories. Their right to protest in this way must be vigorously defended.

The same is true of Palestinians. They are criticized when they resort to violence, and rightly so. Should they be deprived of nonviolent economic protest as well? The United States frequently employs sanctions as a political tool, including against North Korea, Iran and Russia.

Mr. Cardin and Mr. Portman say their legislation merely builds on an existing law, the Export Control Reform Act, which bars participation in the Arab League boycott of Israel, and is needed to protect American companies from “unsanctioned foreign boycotts.”

They are especially concerned that the United Nations Human Rights Council is compiling a database of companies doing business in the occupied territories and East Jerusalem, a tactic Senate aides say parallels the Arab League boycott.

But there are problems with their arguments, critics say. The existing law aimed to protect American companies from the Arab League boycott because it was coercive, requiring companies to boycott Israel as a condition of doing business with Arab League member states. A company’s motivation for engaging in that boycott was economic — continued trade relations — not exercising free speech rights.

By contrast, the Cardin-Portman legislation would extend the existing prohibition to cover boycotts against Israel and other countries friendly to the United States when the boycotts are called for by an international government organization, like the United Nations or the European Union.

Neither of those organizations has called for a boycott, but supporters of Israel apparently fear that the Human Rights Council database is a step in that direction.