German cobbler Adi Dassler revolutionised running when he started hammering spikes into track shoes almost a century ago. Today most of the 258 million pairs of shoes produced each year by his firm Adidas are made in low-cost Asia.
That could soon change as cheaper, faster and more flexible robots mean manufacturing - including producing fiddly footwear - could be brought closer to consumers in high-wage countries like Germany, speeding up delivery and slashing freight costs in what some call a fourth industrial revolution.
Adidas is working with the German government, academics and robotics firms on new technologies it hopes will trigger a significant a shift in the footwear industry as the move led by its arch rival Nike to produce in Asia decades ago.
The project is part of a broader drive by Adidas to catch up with Nike, which has extended its lead as the world's biggest sportswear firm in recent years with innovative products such as its "Flyknit" shoes made out of machine-knitted fibre.
"We will bring production back to where the main markets are," Adidas chief executive Herbert Hainer said in March. "We will be the leader and the first mover there."
Adidas hopes to be able to produce a custom-made running shoe from scratch in a store in Berlin by next year, using a stitching machine and a foamer to make the sole.
Nike, which has long faced criticism for using Asian sweat shops to produce its pricey footwear, is also investing heavily in new manufacturing methods. But it has not yet put a date on when it expects that to result in more US-based production.
Jobs at risk
Key to moving footwear manufacturing closer to Western markets are technologies which cut the need for workers to piece together shoes. A machine can now "knit" an upper like a sock, robots can already complete more of the final assembly of the shoe, while 3-D printing could soon allow the production of a customised sole.
That could threaten millions of jobs in the footwear industry in countries like China, Brazil and Vietnam, but potentially create new positions elsewhere, albeit for more highly skilled labourers working alongside robots.
Robots, now used mainly in auto production, could soon cut labour costs by 18% or more by 2025 in other sectors, the Boston Consulting Group (BCG) predicts.
The new technology is being closely guarded: photographers were not invited to an investor presentation at the Adidas innovation centre, where it demonstrated a robot that could stick its trademark three stripes to a running shoe.
Nike, for its part, tried to stop Adidas producing a knitted shoe that it said violated patents for the "Flyknit" technology it launched in 2012. However, a German court ultimately allowed Adidas to resume production of its "Primeknit" shoes.
Nike says it can make "Flyknit" shoes with half the labour input of a typical "cut-and-sew" shoe as it has 80 percent fewer components, also resulting in 70 percent less waste as it no longer needs to cut pieces from a pattern and discard the rest.
Nike co-founder Philip Knight shook up the sporting goods industry that Adidas has dominated until the 1970s after putting into practice his thesis paper arguing that sneakers from lower-cost Japan could compete with pricier German-made versions.
Today, Asia produces 87% of all footwear, with China by far the biggest manufacturer, followed by India, Brazil and Vietnam, according to APICCAPS, the association of Portuguese footwear manufacturers that compiles global industry figures.
Increasing speed to boost margins
Nike and Adidas each rely on more than 1 million workers in contract factories worldwide to make their shoes.
While the need for speed is one motivating factor, rising wage costs, particularly in China, are also driving the shift.
"That element is going up dramatically," said Glenn Bennett, head of global operations for Adidas who leads the project aimed at getting products to shoppers faster than the six weeks needed for shipments to arrive from Asia.
Adidas is working with companies like automotive supplier Johnson Controls, robotics experts Manz and knitting machine maker Stoll on new processes as it targets prototype in-store manufacturing by next year.
Adidas says more local manufacturing should leave it with less surplus stock it has to discount, helping to lift its operating margin above 10% from 6.6% in 2014, still behind the 13% Nike recorded last year.
Nike, which saw sales in North America dampened earlier this year by delays to deliveries from Asia due to labour disruption at ports on the US West Coast, is unlikely to allow its German rival to get much of a headstart on localised production.
During a visit by US President Barack Obama to Nike headquarters last month, the firm promised to create 10,000 jobs in the United States in the next decade by producing more in its home market if a trade deal with Asian countries is approved.
"We are putting a lot of money and a lot of resources against how our supply chain evolves to increase speed and make sure we deliver to consumers as quickly and innovatively as we can," Trevor Edwards, Nike brand president, said in March.
Beyond knitting and 3-D printing, other innovations helping to speed up production include bonding and gluing technologies to fuse together fabrics as well as waterless dyeing which allows pigments to penetrate textiles more quickly.
Yves-Simon Gloy, an expert from the Institute for Textile Technology at Aachen University who is collaborating with Adidas and sees the dawning of a fourth industrial revolution due to the emergence of "cyber physical systems", machines equipped with sensors, cameras and motors that can be adjusted using the Internet in real time.
But Bennett and Gloy do not expect these smart machines to completely usurp human workers.
"The breakthrough will probably happen in finishing the product close to the consumer," said Bennett. "Not moving the whole of the operation".