The crew of The Melody repulsed the pirate attack
Spanish forces have arrested nine Somalis suspected of being the pirates who attacked an Italian cruise ship.
A warship intercepted a skiff carrying the nine Somali suspects, the Spanish defence ministry said.
The nine were captured near the Seychelles and handed over to authorities there, officials said.
The Italian cruise ship, the Melody, was attacked by a group of pirates in a speedboat in the area on Saturday. No-one was hurt in the incident.
The ship's crew and security men repulsed the attack by firing into the air and spraying the gunmen with water.
About 1,500 people were on the vessel.
After the hijacking attempt, a search was launched for the pirates by the Spanish frigate Numancia, along with patrol planes from the Seychelles and France and an Indian navy ship.
Spanish officials said that during the search they found two small boats with nine suspects on board close to the scene of the attack.
The suspects abandoned one of the boats and were later caught in the skiff.
The Numancia "intercepted a skiff with nine occupants who could be connected to the hijacking attempt of the Italian cruise ship which was eventually repelled by the boat," the defence ministry said in a statement quoted by AFP news agency.
The nine are the latest suspected pirates to be arrested by international forces operating off the coast of Somalia.
France has charged three people with hijacking and false imprisonment after a rescue operation involving a yacht in the Indian Ocean on 10 April.
A Somali teenager is also facing trial in the US after being captured during the rescue of a ship's captain off the coast of Somalia earlier this month.