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 Donald 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 the close American ally appeared to be unprecedented and marked a deep foray by Israel into America’s bitterly polarized politics. It is also a sharp escalation of Israel’s campaign against the international boycott movement.

Interior Minister Aryeh Deri issued a statement saying that after consultations with Prime Minister Benjamin Netanyahu and other senior Israeli officials he decided not to allow Tlaib and Omar to enter because of “their boycott activities against Israel.”

The two newly-elected Muslim members of Congress are outspoken critics of Israel’s treatment of the Palestinians. Tlaib’s family immigrated to the United States from the West Bank. Deri said Israel would consider any request from Tlaib to visit relatives on humanitarian grounds.

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.”

Last month, Israeli ambassador to the U.S. Ron Dermer had said Israel would not deny entry to any member of Congress.

The interior minister’s statement said “the state of Israel respects the American Congress, in the framework of the close alliance between the two countries, but it’s unacceptable to allow the entrance to the country of those who wish to harm the state of Israel, especially during their visit.”

Supporters of the boycott movement say it is a non-violent way to protest Israeli policies and call for Palestinian rights. Critics say the movement aims to delegitimize Israel and ultimately erase it from the map, replacing it with a binational state.

Israel often hosts delegations of U.S. representatives and senators, who usually meet with senior Israeli officials as well as Palestinian officials in the occupied West Bank.

MIFTAH, the Palestinian organization that was set to host Tlaib and Omar in the West Bank, issued a statement saying that Israel’s decision was “an affront to the American people and their representatives” and “an assault on the Palestinian people’s right to reach out to decision-makers and other actors from around the world.”

It was not immediately clear if the two congresswomen had planned on meeting with Israeli officials during their visit. Their spokespeople did not immediately respond to a request for comment.

The decision to ban the congresswomen could further sharpen divisions among U.S. Democrats over Israel ahead of the 2020 elections. Republicans have amplified the views of left-wing Democrats like Tlaib and Omar to present the party as deeply divided and at odds with Israel. Democratic leaders have pushed back, reiterating the party’s strong support for Israel, in part to protect representatives from more conservative districts.

In July, the Democratic-led House of Representatives voted overwhelmingly in favor of a resolution against the BDS movement.

Tlaib and Omar have also been the target of repeated attacks by President Donald Trump in recent months, including a series of racist tweets on July 14 in which he said they should “go back” to the “broken” countries they came from. Both are U.S. citizens and Tlaib was born in the United States. The two are members of the so-called “Squad” of newly-elected left-wing Democrats, along with Reps. Alexandria Ocasio-Cortez of New York and Ayanna Pressley of Massachusetts.

American Jewish organizations had objected to barring the two Democrats from entering the country. The American Jewish Congress said that despite Omar and Tlaib’s planned “propaganda exercise,” it believed that “the costs in the U.S. of barring the entry of two members of Congress may prove even higher than the alternative.”

Politicians and former diplomats also spoke out against barring the congresswomen from visiting.

Former U.S. Ambassador to Israel Dan Shapiro wrote on Twitter that the decision to bar their entry “harms Israel’s standing in the U.S., boosts BDS.”

Israeli lawmaker Ayman Odeh, leader of the Joint List of Arab parties, criticized the move, writing that “Israel has always banned Palestinians from their land and separated us from other Palestinians, but this time the Palestinian is a U.S. Congresswoman.”

Arthur Lenk, formerly Israel’s ambassador to South Africa, said barring Omar and Tlaib “would be sinking us deeper into U.S. domestic political quagmire.”