Updated

With a Russian frigate closing in and a half-dozen U.S. warships within shouting distance, the pirates holding a tanker off Somalia's coast might appear to have no other choice than to wave the white flag.

But that's not how it works in Somalia, a failed state where a quarter of children die before they turn 5, where anybody with a gun controls the streets and where every public institution has crumbled.

The 11-day standoff aboard the Ukrainian MV Faina raises the question: How can a bunch of criminals from one of the poorest and most wretched countries on Earth face off with some of the world's richest and well-armed superpowers?

"They have enough guns to fight for another 20 years," Ted Dagne, a Somalia analyst in Washington, told The Associated Press. "And there is no way to win a battle when the other side is in a suicidal mind-set."

In Somalia, pirates are better-funded, better-organized and better-armed than one might imagine in a country that has been in tatters for nearly two decades. They have the support of their communities and rogue members of the government — some pirates even promise to put ransom money toward building roads and schools.

With most attacks ending with million-dollar payouts, piracy is considered the biggest economy in Somalia. Pirates rarely hurt their hostages, instead holding out for a huge payday.

The strategy works well: A report Thursday by a London-based think tank said pirates have raked in up to $30 million in ransoms this year alone.

"If we are attacked we will defend ourselves until every last one of us dies," Sugule Ali, a spokesman for the pirates aboard the Faina, said in an interview over satellite telephone from the ship, which is carrying 33 battle tanks, military weapons and 21 Ukrainian and Latvian and Russian hostages. One Russian has reportedly died, apparently of illness.

The pirates are demanding $20 million ransom, and say they will not lower the price.

"We only need money and if we are paid, then everything will be OK," he said. "No one can tell us what to do."

Ali's bold words come even though his dozens of fighters are surrounded by U.S. warships and American helicopters buzz overhead. Moscow has sent a frigate, which should arrive within days.

Jennifer Cooke of the Center for Strategic and International Studies in Washington said hostage-taking is the key to the pirates' success against any military muscle looming from the U.S. and Russia.

"Once you have a crew at gunpoint, you can hold six U.S. naval warships at bay and they don't have a whole lot of options except to wait it out," Cooke said.

The pirates have specifically warned against the type of raids carried out twice this year by French commandos to recover hijacked vessels. The French used night vision goggles and helicopters in operations that killed or captured several pirates, who are now standing trial in Paris.

But the hostages are not the bandits' only card to play.

Often dressed in military fatigues, pirates travel in open skiffs with outboard engines, working with larger mother ships that tow them far out to sea. They use satellite navigational and communications equipment and an intimate knowledge of local waters, clambering aboard commercial vessels with ladders and grappling hooks.

They are typically armed with automatic weapons, anti-tank rocket launchers and grenades — weaponry that is readily available throughout Somalia, where a bustling arms market operates in the center of the capital.

They also have the support of their communities and some members of local administrations, particularly in Puntland, a semiautonomous region in northeast Somalia that is a hotbed for piracy, officials and pirates have told the AP.

Abdulqadir Muse Yusuf, a deputy minister of ports in Puntland, acknowledged there were widespread signs that Puntland officials, lawmakers and government officials are "involved or benefiting from piracy" and said investigations were ongoing. He would not elaborate.

Piracy has transformed the region around the town of Eyl, near where many hijacked ships are anchored brought while pirates negotiate ransoms.

"Pirates buy new luxury cars and marry two, three, or even four women," said Mohamed, an Eyl resident who refused to give his full name for fear of reprisals from the pirates.

"They build new homes — the demand for construction material is way up."

He said most of the well-known pirates promise to build roads and schools in addition to homes for themselves. But for now, Mohamed says he has only seen inflation skyrocket as the money pours in.

"One cup of tea is about $1," he said. Before the piracy skyrocketed, tea cost a few cents.

Piracy in Somalia is nothing new, as bandits have stalked the seas for years. But this year's surge in attacks — nearly 30 so far — has prompted an unprecedented international response. The Faina has been the highest-profile attack because of its dangerous cargo. The U.S. fears the arms could end up in the hands of al-Qaida-linked militants in a country seen as a key battleground on terror.

The United States has been leading international patrols to combat piracy along Somalia's unruly 1,880-mile coast, the longest in Africa and near key shipping routes. In June, the U.N. Security Council passed a resolution that would allow countries to chase and arrest pirates after attacks increased this year.

But still, the attacks continue. Dagne, an analyst in Washington, said that unless the roots of the problem are solved — poverty, disease, violence — piracy will only flourish.

"You have a population that is frustrated, alienated, angry and hopeless," Dagne said. "This generation of Somalis grew up surrounded by abject poverty and violence."