Close up, NAFTA is not a pretty sight.

Along the Mexican border, some freight trains have been backed up all the way to Kansas, waiting to squeeze through one-track crossings. Seething, honking lines of trucks choke tiny Texas towns with Manhattan-style traffic jams. Even ships have problems: Outside the busiest Mexican port, Veracruz, 12 were at anchor in the sparkling Gulf waters one recent day as they waited for scarce docking space."You have to get used to it," sighs Capt. Czeslaw Pacholczyk, whose ship recently sailed from Houston to Mexico.

Trade among the United States, Canada and Mexico under the North Amer-i-can Free Trade Agreement is hitting a giant pothole: There aren't enough bridges, rails and docks to handle the goods, and the existing structures are often in the wrong places, mired in the traffic of busy downtowns. The result can be hours-long delays for billions of dollars of goods crossing North American borders.

"This infrastructure was built for a different era," says James Giermanski, a professor at Texas A&M International University in Laredo. "It's hamstringing the trade."

The stakes couldn't be much higher. Last year, the United States had $477 billion in trade with Mexico and Canada, up 13 percent from 1997. Squeezing the flood through border bottlenecks spreads extra expenses through the economies of all three nations - as much as $2.5 billion a year. But analysts say the real cost may be to NAFTA's much-vaunted potential as a truly open-trading milieu, the main selling point for the controversial 1994 pact. Supporters once advertised a powerhouse trade bloc of three closely knit economies.

But "if we're really going to have free trade, you just can't have a truck waiting in line for five miles," says Bernard La-Londe, professor emeritus at Ohio State University. "From day to day, you don't know what's going to happen. It's contrary to the logic of NAFTA."

That's a major problem in today's hurry-up economy, where retailers and manufacturers demand clockwork precision in trans-portation to keep factories running and store shelves full. Many companies complain if freight is just 15 minutes late and can hardly imagine waiting hours for urgently needed goods.

Cole-Haan Inc., a unit of Nike Inc., even yanked a shipment of 144 pairs of shoes off a truck that was stuck in Mexico for five days; a retail customer was already running ads for them. The footwear flew by Federal Express - at more than twice the cost.

For U.S. auto companies alone, one study put the price of delays at Laredo at almost $3 million annually in wasted time, higher labor costs and extra storage expenses. "There's not a flow-through process at the border," says Stephen Harley, a logistics manager for Ford Motor Co. Ultimately, of course, those extra costs trickle down to consumers; transportation accounts for 5 percent to 10 percent of retail prices.

Though the worst delays occur at about a dozen choke points in all three nations, the price tag to fix the infrastructure would be steep: more than $2.5 billion. Some improvements are already on the way, including rail yards, ship berths and bridges. But many other plans are bogged down by complex bureaucratic rules or local resistance. Permission to build a new bridge across the Rio Grande, for instance, requires filings with more than 25 government agencies in Mexico and the United States.

Meanwhile, some bridges and other facilities built in recent years are in little-used places or have bad connections. One span, in Los Indios, Texas, gets less than half the trucks it could handle; it's 20 miles from the major crossing at Brownsville, where the downtown is crammed with freight heading to Mexico. A crossing in Calexico, Calif., waited months for a highway to be built on the Mexican side. For a while, the U.S. road connected to nothing but sand dunes.

"In some places, there's been an `if we build it, they will come' attitude," says Rob Harrison, an economist at the University of Texas' Center for Transportation Research in Austin.

NAFTA itself didn't make any provisions for new infrastructure. Though the federal government has to approve new border resources such as bridges, the initiative comes at the local level, with towns and counties typically raising money and planning their own structures. "The infrastructure is mixed," says M. Elizabeth Swope, coordinator for U.S.-Mexico border affairs at the State Department. It's "good in some places and bad in others."

Of course, a weak infrastructure isn't the only thing holding NAFTA back; every agency from customs to immigration to law enforcement has a hand in inspecting and bogging down border trade. U.S. efforts to detect illegal drugs, including searches by trained dogs and drilling holes in truck trailers to find hidden compartments, also slow things down. Cultural variances, including differing work schedules in different nations, can create problems. "We lose half our time with inspections and paperwork," says Larry Fields, president of the Texas Mexican Railway Co. of Laredo.

But it's no customs agency that draws Pacholczyk's ire on his recent voyage. It's almost 4 a.m. when his big ship, the Renate Schulte, arrives at the Mexican port of Tampico, before going on to Veracruz. He picks up the radio to call for a pilot to steer him into the harbor, a service available 24 hours a day at all U.S. ports. But he gets no response; the port doesn't guarantee late-night pilots unless the shipping line calls ahead.

"It's not professional behavior," complains Pacholczyk, a meticulous man who sports a neatly pressed shirt on the bridge even in the middle of the night.

Not until afternoon the next day can his ship, operated by Crowley Maritime Corp. of Oakland, Calif., finally ease through the narrow channel, with tiny fishing boats darting around it. The dock is crowded and chaotic, with workers on bicycles dodging cars, trucks and forklifts. Corn unloaded from another freighter is scattered across the pavement where it missed the opening of a rail car. Tampico has no modern cranes for lifting truck-size cargo containers, the way most U.S. and European ports do, so vessels use their own cargo lifters, which can take twice as long.

"There's hardly any space," says Rinus Schepen, a Crowley vice pres-ident, adding that his ships have waited as long as 10 hours for a berth at Tampico.

Cargo can wait even longer than that in Laredo, by far the busiest U.S.-Mexico crossing point; last year, an average of $65 million in goods funneled through the city each day. There, the trucks form lines as long as four miles through the center of town. One City Council member even suggested setting up roadside toilets for the stranded drivers. While waiting for trailers to cross from Mexico to the United States, where they can be switched to American tractors, U.S. truckers crowd movie theaters and restaurants; a few have even become regulars at the local Casa Blanca Golf Course.

The problem: Much of the freight flows over two aging bridges in the center of town. Last year, after decades of heavy use, a 3-foot hole opened up in one of them. "You could see the river," says Rafael Garcia, manager of Laredo's bridges. The problem has been fixed.

Trains don't do much better there. The most heavily used border rail bridge is a one-track structure that was built four decades ago and rattles with 1,250 rail cars crossing every day. Traffic over it is controlled by Simon Medina Jr., an unflappable Texas Mexican Rail-way employee who works in a dilapidated shack with a plastic-foam cup plugging a hole in the door. Sometimes, Medina speaks into two phones, to one in Spanish and the other in English; often, he must referee between rival railroads. The companies "act like babies," he says. "They say, `Why can't my train go? I was here first."'

On a recent night, a mile-long train of coffee, tar and steel crawls through downtown Laredo, past the public library and rows of small houses, blocking annoyed truck drivers and blasting its horn to warn pedestrians. Suddenly, a gauge inside the locomotive plunges: An impatient teenage bicyclist has unhooked some cars. Brakeman George Dabdoub leaps out to fix it, returning a few minutes later, relieved that drivers aren't swearing at him.

Railroads, shipping lines and transportation officials say part of the problem is the time lag between planning construction and actual building. Even in faraway Chicago, where southbound Canadian rail shipments can wait for days, Canadian National Railway Co. and Illinois Central Corp. plan to merge their systems, so trains can go through the city without stopping. Texas Mexican is building a 480-acre facility where government inspections will be held, to avoid blocking the Laredo rail bridge, while both Laredo and Brownsville plan to build new bridges.

The port of Veracruz is investing more than $300 million to modernize, creating new docking space and fixing up cargo cranes, but shipping lines say it can't keep up with the relentless growth in traffic. One problem: protected historical monuments such as the 400-year-old stone fortress that was built to repel pirates but now takes up a chunk of prime waterfront land. And one central dock is blocked by two turn-of-the-century warehouses, which also have historical-landmark protection.

The U.S. Congress also is stepping in to speed things up, as part of the big six-year transportation bill passed last month. The bill allots $700 million for border projects and major road corridors for north-south trade. Although states have to compete for the money, winners will probably include California, Texas and Michigan.

But such legislation won't solve the problem of the Peace Bridge in Buffalo, N.Y. There, officials have been fighting for four years to build a new bridge to supplement the 70-year-old, three-lane structure, which on an average day is crammed with 4,000 exhaust-belching trucks crossing the Niagara River between the United States and Canada. Locals oppose the somewhat-chunky green-painted project that the bridge authority designed; they want a more-graceful suspension bridge.

An engineering class at a local university prepared six designs for an assignment, while a local architect suggested colorful awnings that would protect the bridge from the elements. "We've had people weigh in with almost every kind of plan imaginable," says Steve Mayer, operations manager for the bridge.

What's more, potential border crossings face a complex international government approval process that has mired one group, in McAllen, Texas, for six years. There, officials have spent nearly $2 million and filed a 14-foot pile of documents with U.S. and Mexican officials for permission to build seven miles of road and a four-lane bridge. The research included everything from interviews with car drivers (to determine traffic patterns) to an archaeologist who went over the site with a shovel and a spoon (looking for Indian relics) to a naturalist (plans now incorporate three bus-size tunnels under the road to help ocelots cross safely).

There may be at least one simple reason why governments are slow to move: Some projects have failed to shift traffic. Los Indios, Texas, for example, has a well-lit crossing with four lanes and a highway sign promising that the Free Trade Bridge is open 6 a.m. to midnight. The chamber of commerce in nearby Harlingen, Texas, which helped finance the bridge, has even offered gift certificates at shops for locals who cross over.

But the bridge is nearly deserted at 7:30 one recent evening, with a trickle of cars and just one 18-wheeler parked at the U.S. end. Though bridge officials say traffic is growing, Gary Nichols, marketing director at Contract Freighters Inc. of Joplin, Mo., one of the biggest U.S. cross-border trucking companies, says he can't remember one of his rigs ever using the crossing.

"It's the bridge to nowhere," he says.