The extraordinary righting of the Costa Concordia from its watery Tuscan grave has given Italy a boost of sorely needed pride, helping erase the shame many felt after an Italian captain took the cruise ship off course in an apparent stunt, crashed it and then abandoned ship before everyone was evacuated.

“Well done!” retiree Aldo Mattera said Tuesday morning as he surveyed the Concordia, upright for the first time since the Jan. 13, 2012, shipwreck that killed 32 people near Giglio Island.

Premier Enrico Letta emphasized the importance of restoring the nation’s civic pride. As he personally thanked Franco Gabrielli, the head of Italy’s civil protection agency who oversaw the project, Letta said the operation had demonstrated what it means to take responsibility for something, no matter how risky or how high the stakes.

“In this case, the public image of our country was one of fleeing responsibility,” Letta said, referring to the captain’s early evacuation from the ship and his subsequent refusal to reboard even after being ordered to do so by the coast guard.

“Instead, today, thanks to all your work and thanks to this concept of assuming responsibility” Italy’s reputation has been restored, Letta told Gabrielli at a ceremony at the government palace in Rome.

The development now allows for a renewed search for the two bodies that were never recovered and for the ship to eventually be towed away and broken up for scrap. It will also enable recovery crews to go from cabin to cabin opening safes so they can to return the valuables that passengers left behind in their frantic nighttime escape.

Nick Sloane, the South African chief salvage master, received a hero’s welcome when he came ashore from the floating barge that served as the operation’s command center.

“She was heavier than I expected,” Sloane told reporters after a few hours of sleep. “But you have to be patient. You can’t do it with a stopwatch.”

Sloane said the most critical moment of the operation that began early Monday came at the beginning, when the Concordia failed to dislodge itself from the reef embedded in its starboard side even after some 6,000 tons of force was applied.

“That would tend to the higher side of assumptions,” he said. “At 6,200 tons she moved, then at 6,800 she got off the rock. That was the crucial moment.”

The Concordia’s submerged side suffered significant damage during the 20 months it bore the weight of the 115,000-ton, 1,000-foot-long ship on the reef. The daylong operation to right it had stressed that flank as well. Exterior balconies were mangled and entire sections looked warped, although officials said the damage probably looked worse than it really was.

The damage must be repaired to stabilize the ship so it can withstand the coming winter, when seas and winds will whip the luxury liner. The starboard side must also be stabilized so crews can affix tanks that will help float the ship off the seabed when it comes time to tow it sometime next year.

The operation had been expected to take no more than 12 hours but expanded to 19 after an initial weather delay and emergency maintenance issues involving the vast system of steel cables, pulleys and counterweights that were used to roll the half-submerged carcass of steel upright.

Sloane said there were no errors, just tense moments — “alarms started to ring” — when the ship didn’t immediately settle onto its artificial seabed platform. Once it did, the control room issued to all the vessels involved the happy announcement that the operation was successful.