The Israeli navy has boarded two protest boats heading to Gaza to try to break the blockade of the Palestinian territory.

The military said forces moved after repeated calls for the boats to turn around were ignored. The boarding was carried out peacefully and nobody was hurt, it said.

The protest boats were the latest attempt by pro-Palestinian activists to draw attention to the five-year Gaza blockade, which critics say amounts to collective punishment.

Israel says the blockade is vital in preventing weapons from reaching violent groups such as Hamas, the Iranian-backed militant group that controls the Gaza Strip.

The protest vessels were being towed to the port of Ashdod where activists will be questioned by police and immigration officials and sent home as soon as possible, Israeli police said. There were 27 activists from nine different countries on board.

Amjad Shawwa, an activist in Gaza, called for their release. He said he had spoken to some of those on the boats about an hour before they were boarded. Contact was severed when their satellite phones stopped working. It was not clear whether Israel was jamming them.

The Israeli military issued a short video showing a naval official calling on the ships to turn around. "The Gaza area and coastal region are closed to maritime traffic as part of a blockade imposed for security purposes," the unidentified officer said.

"Your attempt to enter the Gaza Strip by sea is a violation of international law. We remind you that humanitarian supplies can be delivered to the Gaza Strip by land, and you are welcome to enter Ashdod port and deliver supplies through land crossings."

Israel's navy has intercepted similar protest ships in the past. Israel sees the attempts to break the sea blockade as provocations and publicity stunts, and says the amount of aid in the small boats used by activists is insignificant, as Israel transfers aid to Gaza daily.

Last year, Israeli troops killed nine Turkish pro-Palestinian activists when they resisted an Israeli operation to halt a similar flotilla. Each side blamed the other for the violence. Israel has said its troops fired live ammunition only after they were attacked by activists armed with knives, clubs and metal bars and they felt their lives were in danger. The activists say they were attacked first.

The incident forced Israel to ease its land blockade on Gaza, which was imposed in 2006 and tightened, with Egyptian co-operation, after Hamas seized control of the territory the following year.

Militants in Gaza have fired thousands of rockets into Israel in the past decade, and now have much of southern Israel in range. On Saturday militants fired dozens of rockets at residential areas in southern Israel, killing one Israeli and injuring several others.

After Friday prayers at a Gaza City mosque, Ismail Haniyeh, the Hamas prime minister, said of the boat activists: "Your message has been delivered whether you make it or not … The siege is unjust and must end."