GIGLIO, Italy — After a costly, painstaking and potentially perilous operation to raise the battered hull of the cruise ship Costa Concordia, engineers said early Tuesday that they had succeeded in righting the ship, removing it from two granite reefs where it ran aground last year, killing 32 people.

The 19-hour, highly complicated salvage operation had managed to completely rotate the ship, leaning it on an underwater platform built underneath, the engineers said.

“This was an important, visible step,” Franco Gabrielli, head of Italy’s Civil Protection Agency, said at 4 a.m., accompanied by applause from a few residents who had stayed up all night to follow the operation.

“The rotation happened in the way we thought and hoped it would happen,” echoed Franco Porcellacchia, project manager for Costa Cruises, the ship’s operator. “There is no evidence so far of any impact to the environment. If there are debris to be removed, we will do it tomorrow.”

As parts of the vessel emerged in the later afternoon Monday, discolored and rusting, from the waters where the Concordia has languished, listing on its side, engineers said the operation would most likely take longer than initially planned.

Salvage experts have said the dimensions of the stricken 951-foot vessel made the operation unparalleled in the annals of marine salvage, as more than 500 divers, technicians, engineers and biologists prepared the ship for what is known as “parbuckling” to bring it upright and minimize environmental risks to Giglio Island, a marine sanctuary.

Using huge jacks, cables, pulleys and specialized equipment, the salvage effort had been set to begin at first light, but a sudden storm prevented workers from moving a barge and rubber booms close to the ship.

Pressed down for months by water and the ship’s own weight, the hull showed “great deformations,” said Sergio Girotto, project manager with Micoperi, an underwater construction and offshore contractor.

The next phase of the salvage, engineers said, involved settling the wreck on an artificial seabed made of bags of cement next to underwater steel platforms. To achieve that, the cruise liner needed to be rotated about 65 degrees, they said. If it all goes well, the ship will be towed away and broken up for scrap by spring.

The operation was broadcast live on television and the Internet. The Italian news media portrayed the salvage as a chance for Italy to revamp its image after the wreck, in which the captain fled the damaged ship and the evacuation was chaotic.

The leading national daily, Corriere della Sera, called the shipwreck “a monument to human stupidity” and a “humiliation” for Italy. It said it hoped that the salvage effort would provide a “new and different story” for the country.

The ship’s captain, Francesco Schettino, is to go on trial this fall on charges of multiple manslaughter, causing a shipwreck and abandoning the vessel before everyone was safe. He has denied wrongdoing. A company official and four crew members have already pleaded guilty to reduced charges.

Preparations for the salvage operation took 14 months, and the cost has increased to $799 million from $300 million and could go even higher, according to Costa Cruises. The Costa Concordia has been stabilized with anchors and cement bags, and underwater platforms have been built on the port side. Salvage crews used pulleys, strand jacks and steel cables placed on nine caissons attached to the left side of the ship, to slowly dislodge it Monday from the two rocks where it has been resting.

The operation was monitored by engineers and remotely operated vehicle pilots from a control room on a barge close to the bow of the ship.

If images or sonar showed dangerous twisting, the technicians could adjust the process.