Today, for every $1 required to manufacture in the United States, Boston Consulting estimates that it costs 96 cents to manufacture in China. Yarn production costs in China are now 30 percent higher than in the United States, according to the International Textile Manufacturers Federation.

The prospect of a sweeping Pacific trade agreement that is led by the United States, and excludes China, is also driving Chinese yarn companies to gain a foothold here, lest they be shut out of the lucrative American market.

The inner workings of Keer’s factory in Lancaster County help demonstrate why yarn can now be produced for such a low cost in the United States and point to the kind of capital-intensive manufacturing that could thrive again in America.

Inside the 230,000-square-foot spinning plant, giant machines help clean the seeds and dirt from the cotton and send the fluff into carding machines that assemble the cotton into thick, long ropes of fiber. Workers then feed the ropes into machines that spin the cotton into spools of yarn or thread.

The work is highly automated, with the factory’s 32 production lines churning out about 85 tons of yarn a day. Even when Keer opens a second factory next year, it will hire just 500 workers, a fraction of the thousands of workers who toiled at cotton mills across the South for much of the 19th and 20th centuries — a big reason Keer is able to keep costs down.

Notice the factory is highly automated and does not have many workers

Ni Meijuan, center, with trainees at Keer Group’s cotton mill in South Carolina. Keer, a Chinese manufacturer, set up a factory in the United States in part because textile production in China is becoming increasingly unprofitable. Credit Travis Dove for The New York Times

Then there are the cultural differences. Ms. Ni, one of 15 Chinese trainers at Keer’s Indian Land plant, complained softly of American workers’ occasional tardiness. In China, she said, managers can dock the pay of workers who show up late. But here, she said, she felt frustrated that she could not discipline tardy staff.

Robbie Sowers, a 32-year textile industry veteran who maintains the plant’s spinning machines, called such differences minor. He said Keer managers had started giving workers six minutes’ leeway before calling them late.

“There’s a lot of talent and experience here in South Carolina,” he said. “It’s just a matter of getting used to the American way of working.”

As she walked through the factory floor, Ms. Ni pointed to digital screens at the end of each row of spinning machines, which displayed in real time, out of a score of 100, how efficiently those machines were kept running by their operators. The screens flashed: 76, 85, 90. Experienced workers in China rarely let that number drop below 97, she said.