Last year, more than half the agricultural products exported from Mexico to the United States were fruits, vegetables and juice, while these foods made up only 7 percent of what the United States exported to Mexico, according to the United States Department of Agriculture.

United States exports to Mexico have been dominated by meat, soybeans and corn. The average annual value of grains crossing into Mexico jumped to $4.7 billion in 2016 from $897 million before Nafta. Pork and beef exports also surged during the same period; exports of high-fructose corn syrup jumped to $345 million annually from $5 million.

After Nafta, Mexican farming became more efficient, but also contributed to a major shift in how the industry was structured. Overall paid employment of farm workers rose by 2.8 million but there was a displacement of 4.8 million people who left family farms, according to a study by the Woodrow Wilson Center that has been cited by some Mexican officials as evidence of Nafta’s imperfections.

Duncan Wood, director of the center’s Mexico Institute, said falling food prices, coupled with a stagnant economy, have left many Mexicans in a curious economic position. “People are able to indulge in more processed food, consuming more calories,” Mr. Wood said, “but not rich enough to have an affluent lifestyle where they are able to be healthier.”

So went the Ruiz family. As a boy, William Ruiz adored home-cooked meals like traditional thick stews with squash, carrots, potatoes and green beans. The family rarely ate out.

But when he was 11, the family moved to Villahermosa, the bustling, heat-scorched capital of Tabasco where American fast-food joints had become plentiful. The Ruizes became avid patrons of Domino’s and Burger King. McDonald’s was their favorite.

William savors the memory of his first Happy Meal — the crispy fries, chicken nuggets and toys nestled in the box. “It was like having something first-world on your uncivilized ranch,” he said, “It was beautiful.”