U.S. officials say two Americans who were kidnapped by pirates off the Nigerian coast last month have been freed.

State Department spokeswoman Jen Psaki confirmed the men's release on Tuesday.  She declined to provide details of how they were freed, citing privacy concerns.

Earlier, officials identified the men as the captain and the chief engineer of the C-Retriever, a U.S.-flagged oil supply ship.

The two men were kidnapped after pirates stormed the vessel off the Gulf of Guinea.

U.S. officials said the pirates released the rest of the crew and the vessel last month.

Also last month, the International Maritime Bureau warned of increased pirate activity in the Gulf of Guinea.

The group says the West African region is now among the most dangerous in the world.