AP / Jordao Henrique East Timorese soldiers and police patrol as part of an operation to capture rebels involved in attacks on the president and prime minister in March 2008

For most, the presence of an outfit of ninjas conjures scenes of Japanese comic book assassins or, perhaps, of mutant turtles dwelling in a sewer. But in East Timor, ninjas have become a national security threat. The impoverished country, perched on the fringes of the Indonesian archipelago, is in the grips of a six-month campaign aimed at curbing "ninja" activities  a euphemism, ostensibly, for clandestine, anti-government militancy. Earlier this year, Longuinhos Monteiro, East Timor's police chief, donned commando fatigues and personally led an operation into the country's western marches. He sent out a warning via the press: "Any ninjas who want to take us on, your final stop will be Santa Cruz cemetery [in the capital, Dili]."

To understand the way of the East Timor ninja, one has to look at the nation itself. After becoming formally independent in 2002, East Timor remains very much a fledgling  even experimental  state with a pack of international institutions and NGOs propping up a government that has limited capabilities of its own. The police chief's ninja-fighting bravado was spurred by the mysterious murders of a teenage girl in December and an infant child in January. But, critics say, his campaign masks the misdeeds and brutality of the country's own police, who are slowly taking back control from a force of international peackeepers. Moreover, the threat of "ninjas" resonates deep in the psyche of a nation still traumatized and torn by years of occupation and civil strife. "This idea of a masked man, of a covert agent that's difficult to identify  a kind of ghost  haunts this place," says Silas Everett, country director for East Timor at the Asia Foundation. (See pictures of Timor's turmoil.)

The term "ninja" in East Timor doesn't quite evoke a real band of fighters, but a hidden, sometimes imaginary menace stalking the country. It came into parlance in the 1990s, when shadowy militias backed by the Indonesian army targeted East Timorese independence activists. Villages were terrorized and countless people kidnapped and killed in the dark by men garbed in black. It's estimated that over 100,000 East Timorese lost their lives during Indonesia's 24-year-long occupation of the former Portuguese colony. (The country's current population is a little over one million.) The fear of the death squads played into ancient archipelago lore of a lurking, shapeless apparition that snatches babies and horses in the dead of the night. In a country where forms of witchcraft and sorcery are still widely practiced, the new, real danger of the ninja acquired mystical properties. It's still not uncommon, say researchers, for East Timorese to leave a glass of water outside their door, a knife bobbing within, to ward off the nocturnal ninja.

The new police campaign has not turned up anything quite as fantastical, arresting 20 members of a ragtag dissident group in February. Observers and members of Dili-based NGOs say the police are possibly exploiting the specter of a ninja threat to settle political scores. This is not uncommon in East Timor  despite its small size, the country is riven with a tangled mess of factions and enmities. Fissures remain between those from the west and east of the country, as well as camps once loyal and once opposed to colonial rule under Lisbon and later Jakarta. Divisions within the army led to widespread violence in 2006 that was calmed only by the intervention of peacekeepers sent by Australia and a handful of other nations. In 2008, a unit of renegade soldiers nearly succeeded in a brazen attempt to assassinate both East Timor's President Jose Ramos-Horta, a Nobel laureate, and Prime Minister Xanana Gusmao. With society so fragmented and law and order so fragile, gangs have come to fill the void.

While nobody in East Timor would ever self-identify as a "ninja," as many as 90,000 people  almost a tenth of the population  may belong to one of the country's fifteen-odd "martial arts" groups, or gangs, according to James Scambary, an Australian researcher who is a leading authority on gang culture in the country. Some of these organizations began as cells of resistance to Indonesian occupation between 1975 and 1999; others were first set up by Jakarta as a means to foster patriotism. The end result is a country full of militarized communities with deceptively fanciful names like the "Wise Children of the Land" or "Brotherhood of the Faithful Heart of the Lotus Flower." They have come to swallow up and represent whole neighborhoods and villages, engaging in extortion and fighting with rival gangs over property and turf and, on occasion, over differing political affiliations. "All of these groups see themselves not as gangs, but as security," says Scambary. "They're organs of their communities and provide a form of welfare and protection."

Scambary notes that, parallel to the growing predominance of these violent martial arts groups, there has been an emergence of new apocalyptic, millenarian cults in East Timor, where deeply rooted animist traditions mix with colonial Portuguese Catholicism as well as a new wave of Brazilian Pentecostalism. One group is reportedly parading an 11-year-old boy around as the son of Christ. The head of another claims to be Christ's brother; he is also a member of parliament in Dili. These sects are increasingly engaging in criminal activity, though on a smaller scale than the martial arts groups. Still, says Scambary, they, too, are "harbingers of the sort of social discontent" and disorder that led up to the chaos of 2006.

East Timor ranks near the bottom of the United Nations' human development index. Nearly half the country is illiterate and 40% of its male population is unemployed. Newly found reserves of offshore oil and gas are slowly enabling the government to fill its meager coffers, but East Timor's political leadership is considered too mired in its own squabbles to steer the country toward safe ground. A backlog of some 4000 cases in the courts feeds into a culture accustomed to vigilante justice. Despite a significant U.N. program to nurture its development, the country's police force is widely seen to be ineffectual, as well as caught up in gang rivalries. Yayasan HAK, a Dili-based human rights group, says it has evidence of police abuses committed during the recent anti-ninja campaign  detainees who refused to admit being ninjas were allegedly kicked and beaten with rifle butts.

Indeed, in this environment of instability and uncertainty, the mythical figure of the ninja proves all the more unsettling. Everett of the Asia Foundation recounts a story told to him by U.N. officials who had been summoned to an outlying district of the country by villagers, claiming they had seized a ninja. Upon arriving, they were directed toward a woman said to be literally holding the would-be assassin. They found her and looked on in disbelief. Says Everett: "She was clutching nothing but air."

See TIME's Pictures of the Week.