The bill was defeated 56-44 late Tuesday, short of the 60-vote threshold in the Senate, with all but four Democrats voting against.
The measure would have allowed state and local governments to refuse to deal with businesses that “engage in BDS conduct.” BDS supporters see the increasingly popular movement as a tool to oppose Israel’s oppression of the Palestinian people, but the bill would have been a weapon against it.
The vote came amid a government shutdown and growing tension between the Republicans and Democrats over funding of a wall on the Mexican border demanded by U.S. President Trump.
The BDS movement works to end international support for Israel's oppression of Palestinians and pressure Israel to comply with international law, according to its official website.
Progressives and liberals across the U.S., including civil rights groups such as the American Civil Liberties Union (ACLU), have fiercely opposed the bill, saying it violates the right to free speech.