ROME – An Italian judge lifted the house arrest order for the captain of the shipwrecked Costa Concordia cruiser liner on Thursday, but said he must remain in his hometown near Naples during the criminal investigation regarding the accident off the Tuscan coast that killed 32 people.

Captain Francesco Schettino is accused of manslaughter, causing a shipwreck and abandoning the liner while many passengers and crew were still aboard. Judge Valeria Montesarchio issued the written decision about his detention.

The ship's hull was severely gashed when the luxury liner rammed into a reef close to tiny Giglio island the night of Jan. 13 .

Costa Crociere SpA, the cruise company, contends that Schettino steered the vessel too close to shore. Prosecutors suspect Schettino maneuvered the ship perilously close to the tourist and fishing island in a publicity stunt.

Schettino has insisted that the reef wasn't on the ship's navigational charts, even though the rocky reef jutting from the sea is a landmark in the area. In a written memo to his lawyers, the captain defended his handling of the Concordia after the collision, the Italian news agency ANSA reported, citing a document that will be presented on an Italian TV show later Thursday night.

In the memo, the captain contended that he is no coward and credits what he says was his quick and lucid reaction for preventing what he said would have been greater loss of life, ANSA said.

Schettino has previously said he guided the vessel, which quickly took on water and began listing badly right after impact, toward the island's port to make evacuation easier. In the memo he reportedly claims to have quickly steered the ship away from further harm `'out of pure instinct." The captain also said he wrestled with the decision `'to evacuate or not" the ship before it was near the port and decided against an immediate evacuation.

After the ship listed so badly it was almost on one side, lifeboats on the gashed side could no longer be lowered. Some of the 4,200 passengers and crew members aboard jumped into the sea to swim to the island, while others were rescued by helicopter.

Some witnesses said they saw Schettino on shore while many people were aboard waiting for rescue, but he has claimed he was helping to direct the evacuation, which passengers have described as chaotic and late in getting started.

Experts studying evidence are to report their findings to a court in two weeks.

In the memo, Schettino reportedly says he's `'comforted" by the information recorded on the so-called black-box. Earlier this week, an Italian newspaper reported that that data recorder had not worked properly in the days before the collision and had been scheduled for repair on Jan. 14, when the Concordia was supposed to have docked at an Italian port farther north.

What role a malfunctioning data recorder might have played in tragedy is unclear.