A NATO flotilla sailing toward the Somali coast will begin antipiracy operations within the next few days, but officials said Wednesday that the alliance was still working out the ships’ rules of engagement, AP reported.

The seven NATO warships will escort cargo ships carrying United Nations food aid to Somalia and will patrol the shipping lanes off the Somali coast, where pirates have hijacked more than 25 ships this year and attacked more than 50 vessels.

“They will have the rules of engagement that they need, the operational plan that they need,” said James Appathurai, a NATO spokesman. “I would not be surprised to see all of this complete in the next two days.”

The Sept. 25 seizure of a Ukrainian cargo ship, the Faina, carrying 33 battle tanks and heavy weaponry, has focused international attention on the menace posed by pirates.

United States warships have surrounded the Faina for weeks to prevent the pirates from trying to unload the weapons, and a Russian guided missile frigate is traveling to the area.

The NATO naval group consists of destroyers from Italy and the United States; frigates from Germany, Greece, Turkey and Britain; and a German auxiliary vessel.

“There will be a number of very competent and very effective military ships to provide presence, deterrence and, where necessary and possible, to intervene to prevent acts of piracy and to escort ships,” Mr. Appathurai said.

Details of each ship’s responsibilities and the rules for how they will deal with the pirates are still being worked out.

“This is obviously a very, very complicated thing they are trying to do,” the NATO spokesman said. “There are a host of pirates, but they don’t identify themselves with eye patches and hook hands that they are pirates.”

The NATO crews are likely to find it hard to distinguish between ordinary Somali fishing boats and pirate boats, some experts said.

About 20,000 ships pass annually through the Gulf of Aden, a strategic body of water off the coasts of Somalia and Yemen. Somalia, caught up in an Islamic insurgency, has not had a functioning government since 1991 and cannot guard its coastline.

The operators of the Faina said Wednesday that they had not raised enough money to meet the pirates’ multimillion-dollar ransom demand.

Viktor Murenko, the head of Tomex Team, which operates the cargo ship, said the company had accumulated only $1 million toward the ransom.

He said the bandits were demanding $20 million.

Mr. Murenko said the Faina’s crew members had received food and water and were in satisfactory condition.

AP via The New York Times