To glimpse America's secret war in Africa, you must bang with a rock on the iron gate of the prison in this remote port in northern Somalia. A sleepy guard will yank open a rusty deadbolt. Then, you ask to speak to an inmate named Mohamed Ali Isse.

Isse, 36, is a convicted murderer and jihadist. He is known among his fellow prisoners, with grudging awe, as "The Man with the American Thing in His Leg."

That "thing" is a stainless steel surgical pin screwed into his bullet-shattered femur, courtesy, he says, of the U.S. Navy. How it got there — or more to the point, how Isse ended up in this crumbling, stone-walled hellhole at the uttermost end of the Earth—is a story that the U.S. government probably would prefer to remain untold.

That's because Isse and his fancy surgery scars offer what little tangible evidence exists of a bare-knuckled war that has been waged silently, over the past five years, with the sole aim of preventing anarchic Somalia from becoming the world's next Afghanistan.

It is a standoff war in which the Pentagon lobs million-dollar cruise missiles into a famine-haunted African wasteland the size of Texas, hoping to kill lone terror suspects who might be dozing in candlelit huts. (The raids' success or failure is almost impossible to verify.)

It is a covert war in which the CIA has recruited gangs of unsavory warlords to hunt down and kidnap Islamic militants and—according to Isse and civil rights activists—secretly imprison them offshore, aboard U.S. warships.

Mostly, though, it is a policy time bomb that will be inherited by the incoming Obama administration: a little-known front in the global war on terrorism that Washington appears to be losing, if it hasn't already been lost.

"Somalia is one of the great unrecognized U.S. policy failures since 9/11," said Ken Menkhaus, a leading Somalia scholar at Davidson College in North Carolina. "By any rational metric, what we've ended up with there today is the opposite of what we wanted."

What the Bush administration wanted, when it tacitly backed Ethiopia's invasion of Somalia in late 2006, was clear enough: to help a close African ally in the war on terror crush the Islamic Courts Union, or ICU. The Taliban-like movement emerged from the ashes of more than 15 years of anarchy and lawlessness in Africa's most infamous failed state, Somalia.

At first, the invasion seemed an easy victory. By early 2007, the ICU had been routed, a pro-Western transitional government installed, and hundreds of Islamic militants in Somalia either captured or killed.

But over the last 18 months, Somalia's Islamists—now more radical than ever—have regrouped and roared back.

On a single day last month, they flexed their muscles by killing nearly 30 people in a spate of bloody car-bomb attacks that recalled the darkest days of Iraq. And their brutal militia, the Shabab or "Youth," today controls much of the destitute nation, a shattered but strategic country that overlooks the vital oil-shipping lanes of the Gulf of Aden.

Even worse, in recent days Shabab's fighters have moved to within miles of the Somalian capital of Mogadishu, threatening to topple the weak interim government supported by the U.S. and Ethiopia.

At the same time, according to the UN, the explosion of violence is inflaming what probably is the worst humanitarian tragedy in the world.

In the midst of a killing drought, more than 700,000 city dwellers have been driven out of bullet-scarred Mogadishu by the recent clashes between the Islamist rebels and the interim government.

The U.S. role in Somalia's current agonies has not always been clear. But back in the Berbera prison, Isse, who is both a villain and a victim in this immense panorama of suffering, offered a keyhole view that extended all the way back to Washington.

Wrapped in a faded sarong, scowling in the blistering-hot prison yard, the jihadist at first refused to meet foreign visitors—a loathed American in particular. But after some cajoling, he agreed to tell his story through a fellow inmate: a surreal but credible tale of illicit abduction by the CIA, secret helicopter rides and a journey through an African gulag that lifts the curtain, albeit only briefly, on an American invisible war.

"Your government gets away with a lot here," said the warden, Hassan Mohamed Ibrahim, striding about his antique facility with a pistol tucked in the back of his pants. "In Iraq, the world is watching. In Afghanistan, the world is watching. In Somalia, nobody is watching."

From ashes of 'Black Hawk Down'

In truth, merely watching in Mogadishu these days is apt to get you killed.

Somalia's hapless capital has long been considered the Dodge City of Africa—a seaside metropolis sundered by clan fighting ever since the nation's central government collapsed in 1991. That feral reputation was cemented in 1993, when chanting mobs dragged the bodies of U.S. Army Rangers through the streets in a disastrous UN peacekeeping mission chronicled in the book and movie "Black Hawk Down."

Yet if Mogadishu was once merely a perilous destination for outsiders, visiting today is suicidal.

For the first time in local memory, the airport—the city's frail lifeline to the world—is regularly closed by insurgent mortar attacks despite a small and jittery contingent of African Union peacekeepers.

Foreign workers who once toiled quietly for years in Somalia have been evacuated. A U.S. missile strike in May killed the Shabab commander, Aden Hashi Ayro, enraging Islamist militants who have since vowed to kidnap and kill any outsider found in the country.

The upshot: Most of Somalia today is closed to the world.

It wasn't supposed to turn out this way when Washington provided satellite intelligence to the invading Ethiopians two years ago.

The homegrown Islamic radicals who controlled most of central and southern Somalia in mid-2006 certainly were no angels. They shuttered Mogadishu's cinemas, demanded that Somali men grow beards and, according to the U.S. State Department, provided refuge to some 30 local and international jihadists associated with Al Qaeda.

But the Islamic Courts Union's turbaned militiamen had actually defeated Somalia's hated warlords. And their enforcement of Islamic religious laws, while unpopular among many Somalis, made Mogadishu safe to walk in for the first time in a generation.

"It's not just that people miss those days," said a Somali humanitarian worker who, for safety reasons, asked to be identified only as Hassan. "They resent the Ethiopians and Americans tearing it all up, using Somalia as their battlefield against global terrorism. It's like the Cold War all over again. Somalis aren't in control."

When the Islamic movement arose, Isse, the terrorist jailed in Berbera, was a pharmacy owner from the isolated town of Buro in Somaliland, a parched northern enclave that declared independence from Somalia in the early 1990s.

Radicalized by U.S. military involvement in Iraq and Afghanistan, he is serving a life sentence for organizing the killings of four foreign aid workers in late 2003 and early 2004. Two of his victims were elderly British teachers. A dour, bearded man with bullet scars puckering his neck and leg, Isse still maintains his innocence.

Much of Isse's account of his capture and imprisonment was independently corroborated by Western intelligence analysts, Somali security officials and court records in Somaliland, where the wounded jihadist was tried and jailed for murdering the aid workers. Those sources say Isse was snatched by the U.S. after fleeing to the safe house of a notorious Islamist militant in Mogadishu.

How that operation unfolded on a hot June night in 2004 reveals the extent of American clandestine involvement in Somalia's chaotic affairs—and how such anti-terrorism efforts appear to have backfired.

Interrogation aboard ship

"I captured Isse for the Americans," said Mohamed Afrah Qanyare. "The Americans contracted us to do certain things, and we did them. Isse put up resistance so we shot him. But he survived."

A scar-faced warlord in a business suit, Qanyare is a member of Somalia's weak transitional government. Today he divides his days between lawless Mogadishu and luxury hotels in Nairobi.

But four years ago, his militia helped form the kernel of a CIA-created mercenary force called the Alliance for the Restoration of Peace and Counter-Terrorism in Somalia. The unit cobbled together some of the world's most violent, wily and unreliable clan militias—including gangs that had attacked U.S. forces in the early 1990s—to confront a rising tide of Islamic militancy in Somalia's anarchic capital.

The Somalis on the CIA payroll engaged in a grim tit-for-tat exchange of kidnappings and assassinations with extremists. And Isse was one of their catches.

He was wounded in a CIA-ordered raid on his Mogadishu safe house in June 2004, according to Qanyare and Matt Bryden, one of the world's leading scholars of the Somali insurgency. They say Isse was then loaded aboard a U.S. military helicopter summoned by satellite phone and was flown, bleeding, to an offshore U.S. vessel.

"He saw white people in uniforms working on his body," said Isse's Somali defense lawyer, Bashir Hussein Abdi, describing how Isse was rushed into a ship-board operating room. "He felt the ship moving. He thought he was dreaming."

Navy doctors spliced a steel rod into Isse's bullet-shattered leg, according to Abdi. Every day for about a month afterward, Isse's court depositions assert, plainclothes U.S. agents grilled the bedridden Somali at sea about Al Qaeda's presence.

The CIA has never publicly acknowledged its operations in Somalia. Agency spokesman George Little declined to comment on Isse's case.

For years, human-rights organizations attempted to expose the rumored detention and interrogation of terror suspects aboard U.S. warships to avoid media and legal scrutiny. In June, the British civil rights group Reprieve contended that as many as 17 U.S. warships may have doubled as "floating prisons" since the Sept. 11 terrorist attacks.

Calling such claims "misleading," the Pentagon has insisted that U.S. ships have served only as transit stops for terror suspects being shuttled to permanent detention camps such as the one in Guantanamo Bay, Cuba.

But Tribune reporting on Isse indicates strongly that a U.S. warship was used for interrogation at least once off the lawless coast of Somalia.

The U.S. Navy conceded Isse had stayed aboard one of its vessels. In a terse statement, Lt. Nathan Christensen, a spokesman for the Bahrain-based 5th Fleet that patrols the Gulf of Aden, said only that the Navy was "not able to confirm dates" of Isse's imprisonment.

For reasons that remain unclear, he was later flown to Camp Lemonier, a U.S. military base in the African state of Djibouti, Somali intelligence sources say, and from there to a clandestine prison in Addis Ababa, Ethiopia.

Isse and his lawyer allege he was detained there for six weeks and tortured by Ethiopian military intelligence with electric shocks.

Ethiopia's Ministry of Foreign Affairs and office of prime minister did not respond to queries about Isse's allegations.

However, security officials in neighboring Somaliland did confirm that they collected Isse from the Ethiopian police at a dusty border crossing in late 2004. "The Man with the American Thing in His Leg" was interrogated again. After a local trial, he was locked in the ancient Berbera prison.

"It doesn't matter if he is guilty or innocent," said Abdi, the defense lawyer. "Countries like Ethiopia and America use terrorism to justify this treatment. This is not justice. It is a crime in itself."

Tales of CIA "snatch and grab" operations against terror suspects abroad aren't new, of course. President George W. Bush finally confirmed two years ago the existence of an international program that "renditioned" terrorism suspects to a network of "black site" prisons in Eastern Europe, Iraq and Afghanistan.

As for the CIA's anti-terror mercenaries in Mogadishu, they may have kidnapped a dozen or more wanted Islamists for the Americans, intelligence experts say. But their excesses ended up swelling the ranks of their enemy, the Islamic Courts Union militias.

"It was a stupid idea," said Bryden, the security analyst who has written extensively on Somalia's Islamist insurgency. "It actually strengthened the hand of the Islamists and helped trigger the crisis we're in today."

In the sweltering Berbera prison, Exhibit A in Washington's phantom war in Somalia had finished his afternoon prayers. He clapped his sandals together, then limped off to his cell without a word.

A nation, sinking

The future of Somalia and its 8 million people is totally unscripted. This unbearable lack of certainty, of a way forward, accommodates little hope.

Ethiopian and U.S. actions have eroded Somalis' hidebound allegiance to their clans, once a firewall against Al Qaeda's global ideology, says Bryden. Somalia's 2 million-strong diaspora is of greatest concern. Angry young men, foreign passports in hand, could be lured back to the reopened Shabab training camps, where instructors occasionally use photocopied portraits of Bush as rifle targets.

Some envision no Somalia at all.

With about $8 billion in humanitarian aid fire-hosed into the smoking ruins of Somalia since the early 1990s—the U.S. will donate roughly $200 million this year alone—a growing chorus of policymakers is advocating that the failed state be allowed to fail, to break up into autonomous zones or fiefdoms, such as Isse's home of Somaliland.

But there is another possible future for Somalia. To see it, you must go to Bosaso, a port 300 miles east of Isse's cell.

Bosaso is an escape hatch from Somalia. Thousands of people swarm through the town's scruffy waterfront every year, seeking passage across the Gulf of Aden to the Middle East. Dressed in rags, they sleep by the hundreds in dirt alleys and empty lots. Stranded women and girls are forced into prostitution.

"You can see why we still need America's help," said Abdinur Jama, the coast guard commander for Puntland, the semiautonomous state encompassing Bosaso. "We need training and equipment to stop this."

Dapper in camouflage and a Yankees cap, Jama was a rarity in Somalia, an optimist. While Bosaso's teenagers shook their fists at high-flying U.S. jets on routine patrols—"Go to hell!" they chanted—Jama still spoke well of international engagement in Somalia.

On a morning when he offered to take visitors on a coast patrol, it did not seem kind to tell him what a U.S. military think tank at West Point had concluded about Somalia last year: that, in some respects, failed states were admirable places to combat Al Qaeda, because the absence of local sovereignty permitted "relatively unrestricted Western counterterrorism efforts."

After all, Jama's decrepit patrol boat was sinking.

A crew member scrambled to stanch a yard-high geyser of seawater that spurted through the cracked hull. Jama screwed his cap on tighter and peered professionally at land that, despite Washington's best-laid plans, has turned far more desperate than Afghanistan.

"Can you swim?" Jama asked. But it hardly seemed to matter. Back on dry land, in Somalia, an entire country was drowning.