History has given us a Great Wall of China, a Maginot Line in France, a McNamara Line in Vietnam and a lesson about man-made barriers:

Most of them don't work, as long as there are human beings intent on going from one side to the other.

On that backdrop, the United States and Mexico are embroiled in a dispute over what has come to be known as the Tortilla Curtain, a fence along about 27 miles of their 1,950-mile common border.

Had it nt been for a Huston fence builder's remark that the new barrier would sever the toes of anyone trying to scale it, there likely would have been little debate over the Tortilla curtain.

Item: There has been fencing, although full of holes, along the same border points for years with no criticism. Border crossers have chopped the chain-link fences to shreds.

Item: Congress approved funding for the replacement spans more than a year ago, and an additional section this year, with no critical public outcry.

But in recent weeks the fence has taken on new symbolic significance as a reflection of U.S. immigration policy that seems not to work and as a barometer of increasing sensitivity in U.S.-Mexican Ties.

(That sense of frustration over the entry of illegal aliens into the country showed up again last week when Rep. James H. Scheuer (D-N.Y.), chairman of the House Select Committee on Population, called for a "firm, hard sealing" of the U.S.-Mexico border.)

Aside from humanitarian considerations raised by the fence builder's remark, the barrier dispute has bruised Mexican feelings at an important stage in their relationship with the United States.

The fence has drawn sharp criticism from Mexican President Jose Lopez Portillo as a reminder of mistreatment of aliens.

The dispute comes as a preamble to President Carter's scheduled visit to Mexico in February. And it comes when vast oil discoveries give Mexico added clout in dealing with the United States on a variety of issues, from immigration to trade to energy.

It also coincides with a broad-scale, classified National Security Council study ordered by Carter to examine future relations with Mexico.

No one, least of all the U.S. Immigration and Naturalization Service, which will build the fence, pretends that the barrier will stop the flood tide of illegal immigrants coming from Mexico into the United States.

The idea behind the new improved fence is to slow the flow at the most popular crossing points and to force border jumpers out of urban areas and into open areas where they can be detected more readily.

The most popular crossing places are at El Paso, Tex., and San Diego. U.S. Board Patrol officers made half a million arrest of illegal entrants at those two points last year. Existing chain-link fences have been torn apart, making passage easier.

INS figures the new barriers would force would-be border crossers to the ends of the fences, into open rural areas, where buried electronic sensors - relics of the Vietnam War - would alert the Board Patrol to their movement.

For the time being, probably at least until after Carter's trip to Mexico, the INS has decided to withold construction of the new 10-foot-high barriers.

Meanwhile, INS Commissioner Leonel Castillo has ordered redesign of the fence to preclude any posssible criticism that the barrier is "inhumane," as critics charged after the Houston contractor's remark.

This is what INS envisions with its new fencing scheme:

About six miles of the tough new steel grid, concrete and chain-link fencing will replace old fencing on the border south of San Diego, at a point known as San Ysidro.

A similar length will be erected in the downtown area and outskirts of El Paso, which sits on the international border. Congress last year appropriated $4 million for the El Paso and San Ysidro spans.

Future construction would include another stretch at San Luis, Ariz., about 10 miles south of Yuma. Congress this year approved $1.5 million at the behest of Sen. Dennis DeConcini (D-Ariz.), who said the fence would protect Yuma from borderjumping thieves.

In each instance, the new fence is intended to replace old barriers that are riddled with holes - some large enough to drive an automobile through.

The uproar over the fence has tended to obscure the larger question of illegal immigration into this country. Castillo recently estimated that there are between 3 million and 5 million illegals in the country at any given time.

"Clearly," he said, " a long-range answer is going to require economic development in the sending countries as well as some new policies in the receiving country."

He said Mexico, with progress in birth-control and the development potential provided by its oil income, may be able to relieve internal economic stresses and keep more of its workers at home.

But that, he added, "is still a few years away and we have got a couple of years more at least of quite a bit of work at the southern border."

That is where the new fence - given its Tortilla Curtain nickname by those who saw it as thin, flexible and something the Mexicans would eat up - comes in.

After Congress approved the money, INS contracted with the U.S. Army to come up with a new barrier. The Army in turn contracted with a McLean, Va., firm, Potomac Research Inc., to come up with a design.

"Nobody in the INS ever told anyone to design a fence that would hurt people," said one of the researchers, who declined use of his name.

"The idea was to come up with a fence that would make it difficult for people to pass through. We were told explicitly that there could be no barbed wire, no barbed tape, no electrification. The only restraint we had was that it could cost no more than $40 per foot. At $40 a foot you will get a fence that won't stop anyone," he said.

The final design worked out this way: the 10-foot barrier would have a three-foot concrete base, three feet of tough steel grid and the top four feet of chain-link fencing.

The controversy stems from the steel-grid portion of the fence. The grid is standard metal grating, about a half-inch thick, commonly used for bridge and ship walkways, and as protective fencing in shopping centers.

The manufacturing process results in rough edges on the diamond-shaped grid work. It was that feature that led the fence makers to talk about toes of climers being chopped off.

The fallout was immediate and predictable. President Carter said he did'nt know about it until he read the newspaper and, in any case, he would oppose anything that would injure climbers.

Patrick J. Lucey, the U.S. ambassador to Mexico, was jsut as suprised. He described the toe-cutter remarks as "outrageous" and said protests from Mexicans flooded into embassy.

By then however, it was back to the drawing boards for the Tortilla Curtain. Castillo has ordered a redesign, and it is uncertain when contruction actually will go ahead.

But the criticism still comes, more now for the symbol than the substance of the fence. Mexican-American organizations and some members of Congress have joned the parade of critics.

Said Rep. Eligio de la Garza (D. Tex.), from the Rio Grande Valley: "We have worked too long with our neighbors to the south to see these relationships severed by artificial barriers of concrete and metal . . .

"What we don't need is to engineer a more 'humane' barrier. We need to engineer policies and programs that get at the root causes of the problem - overhauling and strengthening immigration laws, encouraging more labor-intensive Mexican industrial development and, with the aid of the international financial community, the Mexican economy."