Somali pirates freed a chemical tanker and its 23 Filipino crew members Tuesday after holding them hostage for more than five months, a spokesman for the Philippine ship owner said.

Securing the safe release of the crew and the vessel was "difficult and protracted" and the company was "extremely pleased" with the result, Capt. Dexter Custodio, spokesman for Sagana Shipping Inc., said in a statement.

"They have been released, thank God!" said Doris Deseo, wife of Carlo Deseo, the ship's 31-year-old third mate. "They are no longer in the hands of the pirates. I am super happy. That's the only thing we have been waiting for."

The ship was seized Nov. 10, 2008 by pirates in the Gulf of Aden while it was carrying a cargo of phosphoric acid from Dakar, Senegal, to Kandla, India, he said. Earlier reports said the Stolt Strength had been heading to Japan.

Custodio said he could not comment on whether ransom had been paid. "I have no idea because it was the company's crisis management team that has the data about that," he told The Associated Press.

Family members of the crew have told the AP that the Somali pirates earlier demanded $5 million but that the amount had been reduced to about $2.2 million last week.

Custodio said that depending on the available fuel, the ship would sail "to the closest safe port so that they can go home."

Doris Deseo said the company's personnel supervisor sent her a cell phone text message that the ship and the crew had been released around noon Tuesday, and said she called the company to get confirmation.

Asuncion Pacheco, wife of 62-year-old ship captain Abelardo Pacheco, said she was informed that the tanker may be headed to Oman.

She was told by a company official that the amount of ransom paid to the pirates "will not be disclosed for the protection of the others," referring to vessels still being held by the Somali gunmen.

"We are now going to the church for a thanksgiving mass," she said.

Deseo and Pacheco said they haven't spoken to their husbands yet.

Pirates are still holding nearly 100 Filipino crew in about seven ships.