All happy occupations may, like Tolstoy’s families, be alike; but each unhappy occupation is definitely unhappy in its own way. Of course it is too early to tell which our occupation of Iraq—not to mention Afghanistan—will be. As of this writing, the portents are ominous, with mounting numbers of Iraqis dead in violent street demonstrations, the Iranian-backed Shiite clergy clearly positioning themselves to make a power grab, and the remnants of the Taliban still conducting hit-and-run attacks in Afghanistan. We are only at the beginning of what promises to be a long process, however, and it remains to be seen what men of goodwill and patience can do.

The Bush administration, of course, prefers not to use the word occupation at all, and likes to point to our still-shining success in rebuilding Germany and Japan after World War II. But these were largely homogeneous, industrial, Westernized states, with at least some past experience in democracy; Iraq is an ethnically divided, Arabic state jerrybuilt by the British Empire after World War I, following four centuries of Turkish rule. A more analogous occupation might be our very first exercise in nation building.

The Philippines came into our possession before most Americans knew where they were, an enormous, gorgeous, tangled archipelago of more than 7,000 islands and many different ethnic groups, religious sects, and aboriginal tribes, almost half the world away. They had been claimed by Spain since Magellan stumbled upon them in the sixteenth century, and their political history was often described as “Three centuries in a Catholic convent and fifty years in Hollywood.”

“Hollywood” arrived in the form of Comm. George Dewey, on May 1, 1898, just days after the outbreak of the Spanish-American War. Over the course of a morning Dewey destroyed a Spanish fleet in Manila Bay, and we had our first colony—more or less. The only hitch was that Dewey had too few men available to occupy our new possession, and Manila was surrounded by some 30,000 Filipino rebels.

Spanish rule had become both vicious and senile, and the Filipinos had already been fighting for their independence for nearly two years by the time Dewey arrived. In the nine months that ensued, the United States and Spain negotiated a formal end to the war and America held a caustic debate over whether we should annex our first colony. President William McKinley used the time to send 22,000 American troops out to replace the Spanish in the fortifications around Manila—the first U.S. troop commitment outside North America. He also sent Brig. Gen. Thomas Anderson, who assured the rebels’ leader, a 29-year-old general named Emilio Aguinaldo y Famy, that “in one hundred and twenty-two years we have established no colonies. I leave you to draw your own inference.”

McKinley was torn between a small but influential phalanx of progressive imperialists—led by young Theodore Roosevelt, fresh from San Juan Hill, who wanted the Philippines for a naval base to project American power, as a portal to the China trade, and, above all, as proof we were a real Western power, at last—and the anti-imperialists, as weird a collection of political bedfellows as ever lay down together, who feared that the islands would become an intolerable burden, or despised the Filipinos on racial grounds, or, like Mark Twain, believed that taking on a colony would permanently distort the principles the American Republic was based on.

In the end McKinJey came down on the side of the imperialists. The Senate ratified the peace treaty with Spain by a narrow vote. With Americans and their sometime allies occupying trenches just a few yards apart, now only the smallest spark was needed to set off a new round of war, and it was provided when Nebraska volunteers fired on some drunken Filipinos who stumbled toward their sentry patrol and refused to halt.

The American troops, bored and disgusted with their long inaction, erupted from their trenches with all the fury of their own “shock and awe” offensive. Before the first day was over, they had broken the rebel lines and killed at least 3,000 Filipinos. A desperate Aguinaldo tried to offer a truce, only to be told by Maj. Gen. Elwell Otis, “The fighting, having once begun, must go on to the grim end.”

And so it did, degenerating into a savage and merciless struggle. Both sides resorted to torture, and when Filipinos ambushed and killed 54 American soldiers on the remote island of Samar, Brig. Gen. Jacob W. Smith actually proclaimed that Samar “must be made a howling wilderness” and ordered his soldiers to kill any Filipino they encountered over the age of 10: “I want no prisoners. I wish you to kill and burn, the more you kill and burn the better you will please me.”

Smith became “Howling Wilderness” Smith in the American press and was subsequently cashiered; but his tactics were not unique, and the war seemed to be sinking into what a later generation would know as a quagmire. By the summer of 1900 there were 75,000 Americans, or three-quarters of the entire U.S. Army, in the Philippines.

If all of this sounds eerily like a precursor to Vietnam, nothing appears more familiar than the seeming ambivalence of American troops and administrators toward the people whose land they were occupying. U.S. soldiers cursed the Filipinos continually as deceitful, lazy, “brainless monkeys,” “niggers,” and “gugus” and longed to go home. At the same time, they threw themselves into every sort of effort to improve life in the country they were occupying, building sewers, distributing food, vaccinating people against smallpox, and even reforming the Spanish judiciary by appointing Filipino judges. American soldiers started and taught in makeshift schools throughout the islands, bringing formal education to many rural areas for the first time.

It was, as one observer put it, “a harsh and philanthropic war at the same time.” By the time President Theodore Roosevelt declared the conflict officially over, on July 4, 1902, it had ended up costing the United States 4,234 dead and 2,818 wounded, not including thousands more who later died at home of diseases they had caught in the islands. Some 20,000 Filipino soldiers and at least 250,000 civilians had also died, out of a population estimated at 7.6 million.

Even before the war was over, though, our occupation had taken a philanthropic turn when a federal judge named William Howard Taft arrived to serve as the islands’ first civilian governor. Taft considered most of the rebels no better than murderers and referred to his new subjects as his “little brown brothers.” Yet he was also a highly competent administrator, imbued with a strict sense of public duty. From the start it was clear that America’s role in the Philippines was to prepare the country for independence.

“We hold the Philippines for the benefit of the Filipinos, and we are not entitled to pass a single act or to approve a single measure that has not that as its chief purpose,” Taft declared on arriving in the islands, and in his considerable wake came thousands of American volunteers, who would quickly transform our first colonial possession. They would build roads and ports, sewers, water systems, and railroads everywhere. They would reform the archaic law and tax codes left over from the Spanish, stimulate industry and finance, break up the old monastic estates and distribute their land to rural villagers. Before long Filipinos would enjoy the highest literacy rate in Southeast Asia. And vast improvements in public hygiene and health care would go a long way toward doubling the islands’ population by 1920.

“Compared to European colonialism, the United States was indeed a model of enlightenment,” the journalist Stanley Karnow writes in his seminal work on the subject, In Our Image: America’s Empire in the Philippines. In 1916 an act of Congress pledged eventual independence to the Philippines; the islands were made a semiautonomous commonwealth in 1935, and full independence, delayed by World War II, became a reality in 1946.

Yet in Karnow’s assessment, the Americans’ performance in the Philippines “was neither as brilliant as their publicists claimed nor as bleak as their critics contended.” The Americans tried to make the country over into another America but also made clear they considered the Filipinos their racial inferiors. They preached democracy but dispersed patronage to those Filipino politicians who supported U.S. policies. They fought side by side with their “little brown brothers” against the Japanese, during some of the most ferocious combat in World War II, and against Southeast Asian communism during the Cold War, but also felt free to suborn the Philippines’ nascent democracy for years. Since the Reagan administration’s tardy but decisive support for Cory Aquino’s People Power movement in the 1980s, U.S.-Filipino relations have gotten on a more even keel, but not even enough to have kept the country from closing key American military bases for eight years in the 1990s.

Of course, Iraq presents its own unique challenges and possibilities. Among other differences, the United States does not view it as a colony at all and certainly not as a possession. But if we can learn anything from our long adventure into the Philippines, it is that we need a policy that will be consistent not only in deed but in word and attitude as well, one that will avoid condescension and be directed toward making a restored, democratic Iraq truly independent.