Nestled at the foot of the Wasatch Mountains here, the IM Flash plant is a paragon of American high-tech manufacturing.
Robots glide along the ceiling, moving silicon wafers the size of dinner plates between hulking machines that deposit and etch microscopic layers of material to build the most advanced memory chips in the world.
For the 1,700 technicians and scientists who tend to the robots and troubleshoot problems in the delicate manufacturing process, the jobs offer generous pay and benefits and easy access to Utah's many outdoor attractions.
For Intel and Micron Technology, the two American companies that jointly own and operate IM Flash, the venture allows both of them to sell cutting-edge, three-dimensional memory chips while sharing the multibillion-dollar costs of a modern semiconductor factory.
The memory chips produced at the plant are "probably one of the biggest advances of technology in the last 20 years," said Jon Carter, who oversees Micron's strategy for new memory products. And, as he was quick to point out, all of the work was done in the United States. "Micron has done a really good job of having a good footprint on the home front," he said.
In many ways, however, the IM Flash plant is an outlier. While companies based in the United States still dominate chip sales worldwide, only about 13 percent of the world's chip manufacturing capacity was in this country in 2015, down from 30 percent in 1990, according to government data.
Chip makers attribute the decline to a variety of forces, including high American tax rates and the hefty subsidies offered by foreign governments for new semiconductor plants, which can cost as much as $10 billion.
"It's quite a bit more expensive to build a factory in the U.S.," said Stacy J. Smith, the executive at Intel overseeing manufacturing, operations and sales. Intel — which predominantly manufactures in Oregon and Arizona but also has factories in Ireland, Israel and China — estimates that the extra cost for an American plant is more than $2 billion.
Chip makers are hopeful that President Trump, who has promised large corporate tax cuts and a tougher approach to trade with China, will help them.
Intel's chief executive, Brian M. Krzanich, made a public display of his faith in the administration this month when he stood by Mr. Trump in the Oval Office to announce that the company would spend $7 billion to complete a leading-edge chip factory in Chandler, Ariz., creating 3,000 full-time jobs.
Intel said it was talking with the Trump administration and Congress about a broad corporate tax cut as well as other ways to improve the financial incentives for chip makers to locate new projects here. Although the United States has 76 semiconductor plants, many of them are older, and few new ones are being built.
Intel, whose work force relies heavily on highly skilled immigrants, is also pressing the administration to continue allowing such immigrants to enter the country. "We benefit from being able to hire the best talent from around the world," Mr. Smith said.
The chip industry spends about one-fifth of its revenue on research and development, but it wants more federal funding for basic research into fundamental problems, like how to pack transistors closer together and whether materials other than silicon could form the basis of future chips.
"We would like this administration to double down on investments in basic research in universities," said John Neuffer, the chief executive of the Semiconductor Industry Association, a trade group that represents American chip makers. "Help us pedal faster."
Foreign countries have become more appealing for chip manufacturers, in part, because of the rise of contract chip foundries owned by Samsung of South Korea and Taiwan Semiconductor Manufacturing Company. They have made it easy for American tech companies like Qualcomm and Apple to design cutting-edge chips in the United States but outsource production to Asia.
Looming in the background is China, which is currently a bit player in the industry but has committed to spend upward of $100 billion to create a world-class chip industry.
"Today, it's a modest threat, but two, three, four years out, if China plays out as it plans, it could be very significant to subsectors of our industry," Mr. Neuffer said.
Unlike many of their competitors, Intel, based in Santa Clara, Calif., and Micron, based in Boise, Idaho, build most of their chips in the United States and conduct virtually all of their research and development in this country.
The approach they have taken to 3-D memory chips illustrates the complexity of the business as well as the global forces pushing on the industry.
The IM Flash plant in Lehi was built in 1994 and was Micron's first factory outside Boise. In 2005, Intel and Micron struck a partnership to expand the plant and make flash memory there, sharing costs and output.
The two companies have spent the past 11 years developing the newest type of memory, which they call 3-D XPoint. The design combines the functions of a computer's ultrafast working memory and its slower, longer-term storage to create a hybrid aimed at companies like Facebook, Goldman Sachs and Exxon Mobil, which need to process vast amounts of data reliably and at the highest speeds.
David Kanter, the principal analyst at the research firm Real World Technologies, said the technology, which is still being tested by the first round of customers, was very promising. "It could the change the way that computing operates," he said.
However, as with all new chip technologies, the initial products are likely to be expensive. The Lehi plant will continue to make traditional, cheap 2-D memory chips while gradually expanding production of the newer chips.
Both companies have turned to foreign factories to hedge their bets with other products — less expensive, less capable 3-D flash memory designs aimed at the broad slice of the market that wants better performance but is unwilling to pay top dollar for the best technology available.
Micron committed $4 billion to expand a plant it owns in Singapore to make the 3-D flash memory chips, which it began selling last year.
Intel converted an aging factory it built a decade ago in Dalian, China, into one that produces state-of-the-art 3-D memory chips.
"China is the largest market for us on the planet," said Mr. Smith of Intel. "It made sense to locate some production in China."
Indeed, China is an integral part of Intel's long-term strategy. Although national security rules restrict the export of certain American chip technologies, the company has found other ways to operate in the country, where most of the world's computers and smartphones are built.
In 2014, for example, Intel bought a 20 percent stake in Tsinghua Unigroup, part of a state-owned company that is behind much of China's chip ambitions. As part of the $1.5 billion deal, Intel gained a stake in Spreadtrum Communications, a Chinese chip maker, and agreed to license some of its older technology for Spreadtrum's system-on-a-chip products.
Given China's position as the biggest buyer of American chips, the industry is concerned about Mr. Trump's talk of a trade battle with China. At the same time, chip makers believe that China has sometimes treated American companies unfairly and relish the idea of help from Washington on that front.
In any case, Intel and Micron, which rejected a $23 billion acquisition bid by a Chinese company in 2015, say they intend to keep the bulk of their chip manufacturing in the United States.
Rob Magness, an IM Flash employee who works with the equipment that etches and polishes the silicon wafers, is optimistic, but said he knew just how fragile the industry was.
During his 25 years making chips, he has seen employer after employer downsize and move factories offshore as they coped with the brutal economics of chip making.
"All the places I came from are dying," he said. "The other two memory companies I worked for actually went under. The prices just got too cheap."