TEL AVIV, Israel – 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 later this month and warned that if soldiers were 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.

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.

The flotilla organizers dismissed the idea, saying their aim is to breach the naval blockade and bring supplies free of Israeli controls.

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 was 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 was 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 was training to intercept the flotilla ships using nonlethal 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 warned, 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.”