CNN  — 

The Senate approved a Middle East policy bill Tuesday that includes a provision urging President Donald Trump not to precipitously withdraw troops from Afghanistan and Syria until terrorist groups there are destroyed.

It passed on a broad bipartisan vote, 77 to 23.

The measure also imposes new sanctions on Syria and boosts the US’ military alliances with Israel and Jordan, both neighbors of war-torn Syria.

And it makes it easier for states and localities to approve laws to combat the Boycott, Divestment and Sanctions, or BDS, movement against Israel.

Democrats are divided on the BDS component of the bill, some saying it impinges on free-speech rights of Americans to support boycott efforts against Israel for its treatment of Palestinians and other concerns.

They complain that the Republicans purposefully added that provision to a package that otherwise has bipartisan support to put political pressure on Democrats to vote against a bill that is viewed as pro-Israel.

In the end 22 of 47 Democrats voted against the bill. Most of the Democrats running or considering running for President voted against it.

The amendment urging Trump to keep troops in Syria and Afghanistan was authored by Senate Majority Leader Mitch McConnell, a rare rebuke of the President by a GOP leader.

“ISIS and al Qaeda have yet to be defeated. And American national security interests require continued commitment to our missions there,” McConnell said during a floor speech last week before his amendment passed.

The future of the Strengthening America’s Security in the Middle East Act is in doubt as Democrats who control the House are reluctant to take it up without changes.

“This is an effort to politicize Israel, and we are not going to play ball with it,” said a senior House Democratic aide.