JERUSALEM — Israel said Thursday that it will bar two Democratic congresswomen from entering the country ahead of a planned visit over their support for a Palestinian-led boycott movement, a decision announced shortly after President Trump tweeted that it would “show great weakness” to allow them in.

The move to bar Reps. Rashida Tlaib of Michigan and Ilhan Omar of Minnesota from visiting appeared to be unprecedented. It marked a deep foray by Israel into America’s bitterly polarized politics and a sharp escalation of Israel’s campaign against the international boycott movement.

The two newly elected Muslim members of Congress are outspoken critics of Israel’s treatment of the Palestinians and have repeatedly sparred with Trump over a range of issues. Tlaib’s family immigrated to the U.S. from the West Bank, where she still has close relatives.

They had planned to visit Jerusalem and the West Bank on a tour organized by a Palestinian organization aimed at highlighting the plight of the Palestinians.

Prime Minister Benjamin Netanyahu said Israel is “open to critics and criticism,” except for those who advocate boycotts against it.

Shortly before the decision was announced, Trump had tweeted that “it would show great weakness” if Israel allowed them to visit. “They hate Israel & all Jewish people, & there is nothing that can be said or done to change their minds.” He went on to call the two congresswomen “a disgrace.”

Israel has sought to combat the BDS movement, which advocates boycotts, divestment and sanctions against Israeli businesses, universities and cultural institutions. The country passed a law permitting a ban on entry to any activist who “knowingly issues a call for boycotting Israel.”

Ilan Ben Zion is an Associated Press writer.