Updated

Suspected Somali pirates fired on a U.S. Navy warship off East Africa early Thursday in what appeared to be a ransom-seeking attack on an American guided missile frigate, officials said.

The USS Nicholas returned fire on the pirate skiff, sinking it and confiscating a nearby mothership. The Navy took five pirates, suspected to be from Somalia, into custody, said Navy Lt. Patrick Foughty, a spokesman.

LIVESHOTS: Pirates Captured Amid Navy Gunfire

A third pirate boat was involved but managed to escape. The Navy does not know where it has gone, and think some pirates may have gotten away.

International naval forces have stepped up their enforcement of the waters off East Africa in an effort to thwart a growing pirate trade.

Last May, pirates chased a U.S. Navy warship and fired small arms fire at it. The ship, which had recently served as a prison for captured pirates, increased speed and evaded the attack. French and Dutch naval ships also have been attacked by pirates, said Roger Middleton, a piracy expert at the British think tank Chatham House.

"If you think of the kind of young men who are doing this, they go out into the middle of the ocean in a tiny boat. They might not always make rational decisions, and they often attack things that are bigger than they should (attack)," said Middleton.

"It's also quite possible that they don't have a full understanding of the targets they are attacking. Perhaps they just see a big ship they think is a worth a lot of money," he said.

The ammunition and fuel recovered from the skiff will be crucial evidence once the pirates go to trial, as often times pirates throw their guns and ammo overboard before they are captured so as to dispose of the evidence and then claim they were just out fishing.

Thursday's attack came just shy of a year since pirates attacked the U.S.-flagged Maersk Alabama and took American Richard Phillips hostage. Phillips was rescued five days later when Navy SEAL snipers shot three pirates in a lifeboat.

The U.S. Africa Command said the five pirates seized Thursday would remain in U.S. custody on board the frigate for now. The Nicholas is home-ported in Norfolk, Va.

Experts say piracy will continue to be a problem until an effective government is established on Somalia's lawless shores. The country has not had a functioning government for 19 years.

Meanwhile, the Taiwan government said it fears a Taiwanese fishing boat may have been hijacked by pirates off the Somali coast. Officials lost contact with the 79-ton Jih-chun Tsai 68 fishing trawler on Wednesday.

The Associated Press contributed to this report.