GIGLIO ISLAND, Italy -- The crippled Costa Concordia cruise ship was pulled completely upright early Tuesday after a complicated, 19-hour operation to wrench it from its side where it capsized last year off Tuscany, with officials declaring it a "perfect" end to a daring and unprecedented engineering feat.

Shortly after 4 a.m., a foghorn wailed on Giglio Island and the head of Italy's Civil Protection agency, Franco Gabrielli, announced that the ship had reached vertical and that the operation to rotate it -- known in nautical terms as parbuckling -- was complete.

"We completed the parbuckling operation a few minutes ago the way we thought it would happen and the way we hoped it would happen," said Franco Porcellacchia, project manager for the Concordia's owner, Costa Crociere SpA.

"A perfect operation, I must say" with no environmental spill detected so far, he said.

Applause rang out among firefighters in the tent where Gabrielli and other project engineers made the announcement.

The Concordia rammed into a reef of Giglio Island on Jan. 13, 2012, after the captain brought it too close to shore. It drifted, listed and capsized just off the island's port, killing 32 people. Two bodies were never recovered.

The operation to right it had been expected to take no more than 12 hours, but dragged on after some initial delays with the vast system of steel cables, pulleys and counterweights. The final phase of the rotation went remarkably fast as gravity began to kick in and pull the ship toward its normal position.

Parbuckling is a standard operation to right capsized ships. But never before had it been used on such a huge cruise liner.

The ship is expected to be floated away from Giglio in the spring and turned into scrap.

Porcellacchia said an initial inspection of the starboard side, covered in brown slime from its 20 months underwater while the ship was stuck on a rocky seabed perch, "looks pretty bad."

That is the side of the hull that was raised 65 degrees in the operation. Crews might have to do extensive work on that side to ready it for the attachment of empty tanks that will later be used to help float the vessel away. It must also be made strong enough to survive a second winter storm season, when high seas and gusts will likely buffet the 115,000-ton, 300-meter (1,000-foot) long liner.

Helping the Concordia to weather the winter is an artificial platform on the seabed that was constructed to support the ship's flat keel.

"The ship is resting on its platform," Gabrielli said.

About an hour before the rotation was complete, observers said the boat seemed to suddenly settle down upon its new perch.

The Concordia's captain is on trial for alleged manslaughter, causing a shipwreck and abandoning the ship during the chaotic and delayed evacuation. Capt. Francesco Schettino claims the reef wasn't on the nautical charts for the liner's weeklong Mediterranean cruise.

Costa is a division of Miami-based Carnival Corp., the world's largest cruise company.