Dozens of members of a Greek dockworkers' union have blocked the loading of a container of ammunition destined for Israel in protest against the Gaza war, coast guard and union officials told Reuters on Friday.

The container, which arrived at Greece's Pireaus port on Thursday, held 21 tons of ammunition, one of the unionists told Reuters on condition of anonymity. The cargo was trucked from North Macedonia and was due to be loaded aboard a Marshall islands-flagged ship bound for Israel.

Before the incident, the dockworkers' union had called on workers to protest and block the shipment of weapons and ammunition that would be used in the Gaza war.

"It's time to shout loudly that we won't allow Piraeus port to become a war springboard," read their statement uploaded on Facebook. "We fight for peace...no to Greece's participation in the war!"

Pictures uploaded later on the same Facebook page showed people carrying flares and slogans sprayed on a truck that read: "Murderers, get out of the port".

Greece has backed Israel's right to defend itself amid an ongoing conflict with militant group Hamas in Gaza but has called for an immediate ceasefire to end what it has said is an "unimaginable humanitarian catastrophe."

The truck with the cargo remains with port authorities and an investigation has been launched into the incident. An arrest warrant has been issued for a union leader, one of the coast guard officials said. The container had a valid transit permit, another official said.