The Israeli military served notice Thursday that it will stop a flotilla of aid ships that is expected to set sail for the Gaza Strip this month and warned that if soldiers are met with violence, there could be casualties among the activists on board.

The warning was delivered by a senior military officer at a briefing with foreign journalists. It was part of a diplomatic and media campaign that, along with publicized navy preparations, appears intended to head off the attempt by an international coalition of activists to challenge Israel’s naval blockade of Gaza.

An Israeli naval commando raid on a similar flotilla in May 2010 left nine people dead aboard a Turkish vessel carrying activists, drawing international condemnation and forcing Israel to ease its land blockade of Gaza.

The high-ranking officer, speaking on the condition of anonymity under ground rules set by the military, said the navy was determined to enforce what he called a “maritime security blockade,” which he said is aimed at stopping arms transfers to Gaza and had “nothing to do with humanitarian supplies.”

The officer said that militants in Gaza, which is controlled by the Islamist group Hamas, were arming themselves with rockets to attack Israel and that the sea is their biggest potential supply route.

“We cannot and will not let any ship get into Gaza,” the officer said. He asserted that although the flotilla was not expected to be carrying weapons, allowing any breach of the blockade could open the door to such shipments in the future.

“A maritime security blockade is legal only if it is effective and complete,” the officer said. “You cannot have a selective blockade.”

The officer said the navy is training to intercept the flotilla ships using non­lethal means and avoiding close-quarter contact between troops and activists, which could result in casualties. Video footage of a navy drill made available by the military showed water cannons trained on ships simulating flotilla vessels.

The officer said, however, that “if there is violence that puts our soldiers’ lives in danger, we will have to respond, and there may be injuries and casualties.” In last year’s raid, Israel said its commandos opened fire because they were attacked by activists after they rappelled onto the ship from helicopters.

In a public signal to the organizers of this month’s flotilla, the deputy commander of the Israeli navy, Rear Adm. Rani Ben-Yehuda, went before television cameras Thursday and invited the activists to dock in the Israeli port of Ashdod so that their cargo could be transferred by land to Gaza. A similar offer last year was rejected by flotilla organizers, who asserted that their aim was to breach the naval blockade and bring supplies free of Israeli controls.

According to organizers and Israeli navy assessments, the flotilla is expected to comprise 10 to 15 ships carrying activists from various countries who plan to sail to Gaza after converging at sea south of Cyprus.

However, Turkish media reports this week said the main organizer of the flotilla, a Turkish charity known by the initials IHH, was considering withdrawing under pressure from the Ankara government, which is preoccupied with a refugee crisis along the border with Syria. A spokesman for IHH said technical problems with one of the group’s ships, the Mavi Marmara, which is supposed to carry hundreds of activists, could delay departure.

International organizers are scheduled to meet in Athens over the weekend to decide how to proceed.