(CNN) -- The crew of an Italian ship seized by pirates on Monday was freed Tuesday thanks to an operation by U.S. and British troops working with the Italian military, the Italian Foreign Ministry said Tuesday.





Eleven pirates who hijacked the Montecristo surrendered to the troops operating under NATO's Operation Ocean Shield, the ministry said in a statement.





All crew members are safe, the ministry said.





They barricaded themselves in the engine room after throwing a message overboard in a bottle and putting up a cardboard sign to let rescuers know where they were.





They were able to retain control of the ship's steering, even though the pirates destroyed the ship's communications equipment, a NATO officer said.





The USS De Wert was the first ship to arrive on the scene, and monitored the hijacked vessel until the British ship HMS Fort Victoria arrived with a boarding team, Lt. Gwenn Laine of NATO told CNN.





The pirates threw their weapons into the sea as the boarding team closed in, and stood on deck to surrender once they boarded, Laine said.





He praised the crew for following "best maritime practices," saying that by barricading themselves in a safe place they probably avoided violence.





The pirates are in NATO custody, said Laine, who works with the alliance's Operation Ocean Shield.





The captain sent a message Monday indicating that the vessel had been attacked by a ship with five armed people on board, the D'Alesio Group said in a statement.





The captain immediately activated security procedures, the statement said.





The ship was about 1,000 kilometers (620 miles) east of the Somali coast at the time.





The crew includes 23 people from Italy, Ukraine, and India, the D'Alesio Group said.





Their rescue came shortly after Italy said it would start putting military guards on ships traversing the pirate-infested waters off the coast of Somalia





Defense Minister Ignazio La Russa is signing an agreement Tuesday with the confederation of Italian shipowners to put military guards on board vessels in the area of the Indian Ocean at risk from Somali pirates, his ministry told CNN.





Both NATO and the European Union have naval missions dedicated to protecting ships in the region, but hijackings remain common.





As of late September there were some 400 hostages held by Somali pirates, according to the International Maritime Bureau.





There have been 24 successful hijackings this year to date and 194 incidents. The number of incidents is up from last year, but the number of successful hijackings down, according to the IMB.





CNN's Richard Allen Greene, Chris Lawrence, Claudia Rebaza, Gisella Deputato, Laura Perez Maestro and David McKenzie contributed to this report.
where did the message go how many hostages are held who threw the message overboard How many hostages do Somali pirates hold? By what means did the crew send a message? What did the message in the bottle say? Who did Italy's self defense minister sign a deal with? How many hostages are being held? Who will sign a deal with ship owners?
overboard 400 crew members 400 in a bottle the vessel had been attacked by a ship with five armed people on board, the confederation of Italian shipowners 400 Defense Minister Ignazio La Russa
question: where did the message go, answer: overboard | question: how many hostages are held, answer: 400 | question: who threw the message overboard, answer: crew members | question: How many hostages do Somali pirates hold?, answer: 400 | question: By what means did the crew send a message?, answer: in a bottle | question: What did the message in the bottle say?, answer: the vessel had been attacked by a ship with five armed people on board, | question: Who did Italy's self defense minister sign a deal with?, answer: the confederation of Italian shipowners | question: How many hostages are being held?, answer: 400 | question: Who will sign a deal with ship owners?, answer: Defense Minister Ignazio La Russa