When U.S. troops were battling Vietcong guerrillas in this area about 18 miles northwest of Saigon nearly 20 years ago, the Americans had a saying: there are two district chiefs in Cu Chi, it went -- one on the surface and one underground.

The U.S. forces knew of the Vietcong tunnels near the Communist stronghold once known as the Iron Triangle, but they could not destroy the complex and sophisticated 120-mile network, and they apparently did not realize that one of its branches ran right by the base of the U.S. 25th Division at a place the Vietnamese called Dong Du.

Moreover, the U.S. command evidently was not aware that the network linked up with the Communist Party headquarters for Saigon at a place called Than Uy.

There, within 20 miles of the South Vietnamese capital, guerrilla leaders planned the 1968 Tet offensive's attacks on Saigon, according to Vietnamese guides.

Among the leaders based here, the guides say, were Vo Van Kiet, now a member of the Politburo charged with economic planning, and Nguyen Van Linh, a senior member of the Central Committee in Hanoi. Cu Chi a Tourist Attraction

Today, Cu Chi is a tourist attraction, though somewhat off the beaten path. Foreign tour groups, mainly Soviet and East European, and busloads of Vietnamese cooperative members on organized outings regularly visit to hear lectures on how the tunnels were dug and what life was like in them.

Then they descend into the once-secret underground chambers and walk, or sometimes crawl, through sections of the tunnels. But guides have had to curtail some of this exploration after several foreign tourists got lost, one of them for more than three hours.

The network was so intricate, said Vo Van Den, a former Vietcong lieutenant, that when American troops captured him in 1967 and forced him to guide them through the tunnels, he was able to quickly escape by darting down side passages. Den said he joined the Vietcong in the early 1960s and was mainly involved in the protection of the Saigon city committee of the Communist Party. Now 62 and white-haired, Den lives nearby and works the land.

Another former guerrilla here, Le Phuc Nghiep, 42, described how the Communist authorities mobilized thousands of villagers under their control to dig most of the network from 1960 to 1964, apparently with great foresight. For the tunnels enabled the guerrillas to withstand frequent U.S. bombing and to vanish like phantoms whenever American troops swept the area.

According to Tran Thi Bich, 29, one of the Vietnamese tour guides here, work first began on the tunnels in 1948 when the Communists were fighting the French. Tunnels Become Complex

Later, during the struggle against the U.S.-backed Saigon government, she said, the tunnel system grew to include underground meeting rooms 24 feet long and 12 feet wide, storerooms for food, clinics to treat the wounded, wells to provide fresh water and kitchens with special stoves to disperse smoke through a number of bamboo vents so it would not be detected.

The tunnels were dug on three levels as much as 23 feet deep, Bich said, and guerrillas would sometimes live in them for weeks at a time. Dirt was distributed well away from the hundreds of camouflaged entrances to avoid detection, and as the war progressed the tunnels were shored up with logs and steel sheets taken from American airstrips.

But perhaps the most useful contribution unwittingly made by the Americans, Bich said, was the standard GI entrenching tool issued for digging foxholes. The Vietcong tunnel workers found the sturdy, adjustable shovel ideal because, unlike their own tools, it rarely broke, and it could be used like a pick in passages sometimes only 16 inches wide and 24 inches high.

"The Americans were so rich that they left many of them entrenching tools behind when they vacated an area," Bich said. "So we would use them. Also, they would often leave the equipment of soldiers who were killed."

During the war, the Americans tried repeatedly to destroy the tunnels by various means, but never caused any damage that could not be repaired, guides here said. The worst period for the Vietcong was an operation in 1967 that forced the Communists to evacuate many of their people, the guides said. The fighters soon returned, although it took until 1970 to completely repair the system, they said. Protection From Bombing

Other tunnel networks used by the Communists were even more impressive than Cu Chi's. At a site just north of the 17th Parallel that formerly divided North from South Vietnam, the tunnels run up to 80 feet deep and allowed inhabitants to withstand almost incessant bombing by B52s.

"The tunnels were invaluable," said Nguyen Van Thanh, one of the Cu Chi guides. "They contributed a lot to our forces."

"If we didn't have those tunnels we would have been wiped out," Bich said.