Why it matters: In 2013, Google made headlines when it announced plans to assemble Motorola smartphones in Texas, a move that challenged the prevailing belief that high-tech manufacturing could not succeed on American soil. The effort, bold in its ambition, would last just over a year before Google sold Motorola and shuttered the Fort Worth plant. As President Trump calls for Apple to bring iPhone production to the United States, the lessons of Google's experiment have become newly relevant.

Fortune explored this chapter of tech history through extensive interviews, including conversations with five former Motorola employees who had played key roles in the company's US assembly initiative.

The Moto X project began with optimism. Executives at Google and Motorola saw the challenge of building smartphones in the US as an opportunity to prove skeptics wrong. The company's statement at the time declared, "Conventional wisdom said it wasn't possible. Experts said that costs are too high in the US; that the US has lost its manufacturing capability; and that the US labor force is too inflexible." Soon, the Fort Worth plant was producing tens of thousands of Moto X phones every day, and for a brief moment, the idea of a domestically made smartphone seemed within reach.

Steve Mills, Motorola Mobility's chief information officer at the time, recalled the energy of the team. "We felt scrappy and felt we could carve out a niche for ourselves," he told Fortune.

The Moto X was not just another phone. Customers who ordered directly from Motorola's website could customize their device with a choice of colors, materials, and even personalized engravings. This personalization, combined with US-based assembly, allowed Motorola to promise delivery within four days to American buyers.

The Fort Worth plant, operated by Flextronics, focused on final assembly using imported components. Labor costs were higher than in China, with workers earning about three times as much, but the company believed the benefits – faster delivery, lower shipping costs, and a patriotic marketing angle – were worth it.

Despite the initial excitement, the project soon ran into trouble. Motorola's marketing budget was small compared to Apple and Samsung, and the Moto X, though praised for its design and customization, received criticism for its limited storage and screen quality.

There was also a shortage of local expertise and Flextronics had to bring in skilled engineers from around the world. "We had to bring in a very cultural cast of characters," said Mark Randall, who led Motorola's supply chain and operations. Most assembly line workers, however, were recruited locally and required minimal training.

Related Reading: Trump's dream of a US-made iPhone clashes with Apple's manufacturing reality

The challenges mounted as sales lagged. In the first quarter of 2014, Motorola sold 900,000 Moto X handsets worldwide, while Apple sold 26 million iPhone 5s units in the same period. Within nine months, the Fort Worth factory's workforce dropped to 700. "Within the first few weeks, it was clear to leadership that the Moto X was underperforming," Randall said.

The experiment's struggles were not just about manufacturing. The Moto X's customizable options made it difficult to streamline production, leading to higher return rates as customers sometimes regretted their choices.

Motorola's smaller scale meant it could not negotiate the same favorable terms with suppliers as Apple, and the fiercely competitive Android market left little room for error.

By January 2014, Google decided to sell Motorola to Lenovo. The Fort Worth plant was closed, and production moved overseas. "What we found was that the North American market was exceptionally tough," Motorola president Rick Osterloh told the Wall Street Journal after the closure.

Today, the prospect of large-scale smartphone manufacturing in the US remains daunting, even though, as Randall said, the phone's failure "had very much zero" to do with US manufacturing and everything to do with the iPhone being a better device with bigger brand recognition than the Moto X.

Factory automation has improved, but the ability to scale up or down quickly, as is routine in China, is still out of reach domestically. There are also few American suppliers capable of producing enough components for millions of phones, and importing parts could become prohibitively expensive if new tariffs are imposed. Mills suggested that a compromise, such as performing only final assembly in the US, could help companies like Apple avoid tariffs.

Some industry analysts have floated the idea of Apple producing a limited-edition, high-priced iPhone in the US to satisfy political demands without overhauling its entire supply chain. But since Motorola's brief experiment, no major smartphone maker has attempted to build devices at scale in the United States. The lessons of the Moto X remain a cautionary tale for anyone considering a similar path.

Image credit: Fortune