Last year, pirates attacked more than 100 ships in the region, demanding huge ransoms for their release. Their attacks have intensified recently.
Capt Pinto told the BBC that the pirates had tried to hijack his ship late on Saturday, about 290km (180 miles) north of Victoria in the Seychelles.
"One white small boat with six people on board approached the port [left] side of the ship and started shooting."
The captain said the pirates fired some 200 shots at the vessel before being repelled by Israeli security guards.
He said "our security started shooting in the air... and also we started spraying some water" to beat off the attackers.
Capt Pinto said the pirates were forced to give up after about five minutes of shooting and a high-speed chase.
Samantha Hendey from Durban, South Africa, told the BBC that her sister Tabitha Nicholson was on board the ship during the attack and the situation was "pretty dramatic".
"She said that there were lots of passengers on deck watching it unfold and they even took action themselves by throwing chairs overboard, trying to hit the pirates," Samantha said.
"She said there were lots of bullet holes in the ship but that they were not serious enough to force it to return to port."
The head of the Italy's MSC Cruises, which owns the Melody, credited the captain for his "cool-headed" handling of the incident, Italy's Ansa news agency reported.
The ship was on a cruise from South Africa to Italy. It was now headed as scheduled for the Jordanian port of Aqaba.
Somali pirates have hijacked about a dozen ships since the start of April, despite the presence of around 20 foreign naval vessels in the area.
International warships have been patrolling the waters off Somalia and in the Gulf of Aden in recent months as part of an effort to counter piracy.
They have freed a number of ships, but attacks have continued.
Somalia has been without an effective administration since 1991, fuelling the lawlessness which has allowed piracy to thrive.
Shipping companies last year handed over about $80m (£54m) in ransom payments to the gangs.
When first loaded, the map's focus falls on Somalia where most of the pirates are based. Use the arrow icons to scroll left towards Europe and the United States which are both playing a central role in tackling the problem.
Scroll to the right for a story about the Philippines, which supplies many of the world's mariners.
You can zoom in for more detail by using the "+" or "-" signs on the upper left hand side.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.