ARCHIDONA, ECUADOR -- Col. Frank Sefton thought his war was going to be fought on a long, flat Ecuadoran beach at the edge of the Pacific Ocean.

Instead, his troops and a caravan of heavy equipment were ordered over the Andes Mountains and deep into the Amazon River basin where the jungle grows in thick green walls and the rainy season turns the ground to spongy muck.

Their bulldozers sank in the mud. Their dump trucks strained to climb slippery inclines. Equipment was devoured by a raging, rain-swollen river. The troops had to fill a swamp with tons of crushed rock before they could even pitch their base camp.

Then came an explosion of political controversy that eventually led the Ecuadoran Congress, queasy over the presence of U.S. soldiers on its soil, to order the troops out of the country.

This was not war as Sefton or the Army National Guard expected it. But, as a result of this rigorous training exercise, which involved carving three miles of road and a bridge out of seemingly impenetrable Amazon jungle, the Army learned hard lessons that have prompted its leadership to reconsider key parts of its military doctrine, according to Pentagon officials.

They discovered the Army has the wrong equipment to build the supply roads it could need in some future wars. The supply systems for the troops in the field are disorganized and too slow; the clerks frequently were trained inadequately. And, in many cases, the Army's engineering plans would be useless on some battlefields.

"These could be war-stoppers if they're not addressed," said Lt. Gen. Herbert R. Temple Jr., chief of the National Guard Bureau. "If you can't build the road, you can't get the troops to the front."

Sefton, on-the-scene commander for the operation, said, "Yes, mistakes were made, but it's better to make mistakes in training."

In all, it took 8,000 troops working in two-week shifts about eight months to build three miles of road and a bridge. It began as just another training exercise for the Army National Guard. Along with some active and reserve troops, the guard practices its role as a battlefield backup at several locations around the world each year.

Although an increasingly large percentage of those exercises are being conducted in Latin American countries, this was to be the first in Ecuador.

The task was expected to be relatively simple: to practice basic road-building skills by improving access to a beach the Ecuadoran government hoped would become a tourist attraction for the Manabi Province in the western part of the country. The National Guard dubbed the exercise Abriendo Rutas, or "opening roads."

On March 5, shortly after the Guard's equipment had been loaded on ships in New Orleans, a violent earthquake devastated the Napo Province in northeastern Ecuador. The earthquake destroyed the only road leading into the eastern part of the province, isolating 75,000 inhabitants from the rest of civilization.

The Ecuadoran government, participating with the U.S. military in the road project, requested an emergency change of plans. The Pentagon, more enthusiastic about helping the earthquake victims than potential tourism, not only agreed but authorized an extra $3 million for the emergency project, according to U.S. officials in Ecuador.

When the Army's equipment arrived in May, Sefton led a Hannibal-like caravan of 400 bulldozers, trucks and other pieces of heavy equipment and 600 troops on a 700-mile, three-day trek across the Andes Mountains on what National Guard officials termed "the most treacherous roads ever encountered."

That was just the prelude.

The troops decided to build their base camp atop a bog on the outskirts of the tiny village of Archidona. It took 6,000 dump-truck loads of rock just to stabilize the ground enough to erect tents and small buildings. According to the guard's Temple, "This was as much rock as we have moved on any other engineering exercise in Latin America."

Just to get to the work site, the troops had to widen a six-mile stretch of jungle path into a two-lane road that could accommodate their trucks and other vehicles.

Then came the real road-building exercise. The troops had no engineering plans and no experience building roads through jungles that sometimes absorb as much as 23 inches of rain a month.

Their battle plan consisted of trial and error. There were plenty of both.

The road route was changed at the last minute because a massive fault was discovered near the planned roadbed.

The Amazon jungle, with its wild caladium beds, spider monkeys and plum-throated cotinga birds, could be as treacherous as it was exotic.

One soldier was stung 42 times by bees when he felled the tree they considered home. The Ecuadoran red-tailed boa constrictor was a constant lurking threat.

And then there were the rains, torrential downpours that could raise the Rio Hollin seven feet in a matter of hours. One group of soldiers left construction equipment on the edge of the river one night and awoke the next morning to discover the rushing currents had swept it away. With heavy equipment designed for flat, dry terrain, the troops spent much of their time "unsticking stuck 'dozers," according to one operations report.

The Army's rock-crushing machine could not meet the demands of the seven to eight feet of crushed rock the engineers needed to put down before the roadbed construction could even begin.

The troops, who rotated through the project in two-week stints as their annual requirement for active duty training, came away with mixed feelings. For some, the two weeks seemed like eternity. For others, like Monte Reese, director of economic development for a county in Kansas, it was an adventure.

The flow of American troops with big appetites and bigger thirsts created an entrepreneurial gold mine for natives of the tiny villages of thatched huts tucked beneath the palm trees and banana plants. Rustic jungle versions of convenience stores sprang up on the edge of the work sites.

One tribal leader peddled fresh fruits and Pepsi Colas from a newly constructed shed near his village. The mother of eight small children offered Ritz crackers and toilet paper inside a small wooden hut. Chickens scratched in the dirt nearby. Most of the supplies were hauled in by donkey.

At the end of a day, the troops would leave the knee-deep mud of the construction site for the ankle-deep muck of the base camp, where thick, brown clouds of burning human waste hung low over the hundreds of wet tents pitched across the landscape.

Work at the base camp was fraught with problems. Young clerks with inadequate administrative training were making a mess of supply orders for everything from food to bulldozer spare parts. Supplies sometimes took two months to reach the troops, according to one officer.

Troops muddled through despite the shortcomings. And although their completed portion of the road was only a fraction of the total project undertaken by the Ecuadoran government to reestablish transportation links severed by the earthquake, U.S. military officials say they left a significant mark on an isolated area of the Amazon jungle.

Before the road and bridge project was even finished, the U.S. Embassy in Ecuador reported the population of tiny Archidona was growing as residents of the jungle villages began moving into town. The road improvements, modest by American standards, opened new trade with outlying areas. For the first time, a small bus service started running between communities.

As the final troops were pulling out only days ago, Temple wrote in an internal memo to Army chiefs: "We have exposed over 8,000 American soldiers to operations in one of the most hostile environments in the world. We have left a useful and beneficial monument to our efforts . . . . We have won."