Brazilian dock workers in Santos ended a two-day occupation of a Chinese ship in protest at port modernization plans, as unions threatened a national port strike over the government plan which they fear will cost jobs and cut wages.

About 60 stevedores boarded the Zhen Hua 10 early on Monday, stopping it from unloading cranes manufactured by the Shanghai Zhenhua Heavy Industry Co.

The cranes are to be installed at Embraport, a new $1.2 billion private container terminal in Santos that does not use established union procedures to hire workers.

Although the protest was brief with no perceived impact on Santos port, it gave a taste of what is likely to come as unions gear up to resist a sweeping reform of port regulations.

Port workers nationwide plan to walk off the job from 7 a.m. until 1 p.m. on Friday and again from 1 p.m. until 7 p.m. on Tuesday, Paulo Pereira da Silva, a congressman and President of the umbrella union Forca Sindical told Reuters.

"All the ports in Brazil will be stopped at those moments," Paulo Pereira da Silva, President of the Força Sindical trade union, said late on Tuesday.

He said the workers hadn't ruled out a prolonged strike.

The government says the planned changes are imperative to boost efficiency for its world-leading commodity export sector.

Embraport said in a statement that workers left the Chinese ship after the terminal agreed to contract unionized workers to watch over the unloading and assembly of the cranes to be carried out by representatives of the Chinese manufacturer.

Embraport denied allegations by unions that it was contracting Chinese workers as substitute dock workers and said the unloading and assembly of the equipment by the manufacturer was pre-established in the purchase contract.

Twenty years ago, Brazil opened the door to private investment in its terminals, although much of the infrastructure at the country's ports remains in state hands. But private and public terminals at Brazilian ports are still required to source workers through a centralized agency called the OGMO that doles out available shifts to union members.

Embraport, owned by local chemical and infrastructure group Odebrecht, trading company Coimex and the United Arab Emirates' DP World, is one of the first private terminals here not required to contract labor through the OGMO.

And unless President Dilma Rousseff or Congress modifies Decree 595 outlining port regulation reforms, the government could auction off 159 terminals to private investors who would also be free to ignore the OGMO and hire their own labor.

"I'm afraid this will end up in the courts," said Paulo Fleury, a director at the Logistics and Supply Chain Institute (Ilos). "And it will be the exporters and shippers caught in the crossfire between the unions, government and current terminal concession holders."

Fleury said it would be disastrous for existing terminal concession holders, who will still be obliged to use the OGMO "if the government allows competing terminals to set up next door with a completely different cost structure."

Shipments of grain, sugar and coffee from Brazil might be in for a rough ride during strikes and protests that unions are planning for the coming weeks. Interruptions in the flow of these basic commodities could affect futures prices, especially for crops whose yields have been hit by drought in North and South America.

Brazil's grain belt is in the midst of a record harvest of 83 million tonnes of soybeans and 74 million tonnes of corn. Exporters have already dispatched scores of ships to load and carry the crops away from local ports in the coming months.

As the world's population expands, Brazil will be one of the 21st century's most important exporters of food due to its abundant arable land, water and sun.

The government plans to attract $27 billion in private sector investment in the next few years to modernize Brazil's underdeveloped ports.

President Rousseff has pushed forward the reforms as part of an infrastructure package sh