In 1998, Drew Greenblatt took control of Marlin Steel, a small, family-owned company in Brooklyn. The company produced handmade steel-wire baskets used in display cases at bagel stores, and for decades business had boomed, all through the 1990s and even through the early 2000s. But around 2003, two things happened: The skyrocketing popularity of the low-carb Atkins diet took the bagel business out at the knees, and Chinese suppliers began to undercut traditional basket-makers by producing cheaper baskets.

By 2004, the company was on the verge of bankruptcy -- and then, quite out of the blue, Boeing hired Marlin Steel for a rush order of ultraprecision baskets in which to store airplane parts during production. Greenblatt quickly realized that handmade baskets would fulfill neither demanding nano-measurements nor volume requirements, and he made a bet on a computer-guided robot that could rapidly cut metal and bend it into a wide variety of wire baskets.

And the rest, Greenblatt says, is history. "We have shipped over 1 million highly customized baskets from our factory in Baltimore ... without a single quality defect." During the recent recession, its shipments actually increased, and the company expanded its customer base, exporting to China, Mexico, Singapore, Taiwan, and Canada. Over the next decade, Marlin Steel hopes to hit $100 million in sales.

Marlin Steel's experience is far from unique. The Illinois-based Reshoring Initiative counts as many as 200 examples of U.S. companies over the past 10 years bringing their production operations back to the United States. General Electric now makes industrial batteries at one of its oldest industrial sites, in Schenectady, N.Y., (as well as "smart" washers and dryers at a moribund appliance park in Kentucky). Apple just announced a second new American plant in Arizona, and U.S.-made Macs will soon be rolling out of an Apple-Flextronics plant in Austin, Texas, for the first time since 2004 (even though Steve Jobs said this would never happen). Google now assembles smartphones in Texas, where South Korea's Samsung also makes chips for Apple. Airtex Design Group, known for its fashion-oriented designs, is producing textiles again in Minneapolis. Tesla Motors in Palo Alto, Calif., just announced plans to build a massive lithium-ion battery plant in the United States. Caterpillar, Ford, Germany's BASF, China's Lenovo, Chile's Methanex, and Egypt's Orascom are just a few other examples of companies that have started or relaunched production in the United States.

If 10 CEOs had been asked a decade ago -- even five years ago -- where they were going to build their next plant, at least nine would have answered China. Today, no more than two or three would give that answer, and as many as five would say the United States. After a serious slump, U.S. manufacturing is once again the fastest-growing part of the U.S. economy. But perhaps more importantly, the United States is regaining an unexpected edge in the global race for competitiveness after losing ground to low-cost manufacturers in China and other emerging economies over the past decade.

More and more often we are hearing about this kind of reversal of the outsourcing trend to China or India. In April 2012, a survey conducted by the Boston Consulting Group on major U.S. companies found that half of the companies with sales over $10 billion are actively considering reshoring production back to the United States and more than one-third of companies with sales over $1 billion are too. Among those surveyed, 70 percent found sourcing from China more expensive than they had believed, and 90 percent worried about further raises in wages in China.

Central to this shift is a collective mix of regret and brand-new understanding. It's finally sinking in that outsourcing was always as much about getting into new markets as it was about saving on wages. (In any case, wages are a bad proxy for labor costs because they have to do as much with how productive a worker is as with how much that worker gets paid.) What really matters in competitiveness goes far beyond labor costs. Companies learned -- or rather relearned -- that quality and shipping time actually matter to their customers, that transportation costs often turn out to be more expensive than expected, and, with the discovery of shale gas, cheap energy is beginning to make a real difference in the United States. Moreover, separating innovation from manufacturing turned out to be a really bad idea.

For some time, information technology and social media represented the innovative face and competitive strength of the United States, but that is about to change as innovation is spreading from Silicon Valley to Main Street. The new frontier of the knowledge economy will be "brainfacturing," the successor to the old manufacturing that will integrate traditional industrial strengths with the digital world, automation, research-based new materials, and sensors.

These are not isolated instances, and though some are still somewhat mysterious, they add up to a major shift in global competitiveness this time in favor of the United States. What's more, the whole notion of a "decline" of American manufacturing will soon be viewed in an entirely new light. What we talk about when we talk about manufacturing -- and the language we use to talk about it -- will change. Terms like "labor-intensive" and "economies of scale" or the concepts of "manufacturing vs. service sector" will be redefined.

But perhaps most important is that, finally, the idea that manufacturing is old-fashioned, even dirty, has itself become an old-fashioned way of thinking. In fact, manufacturing is not dead in the United States. It's making a comeback.

For more than two centuries, manufacturing was a huge source of growth, economic power, innovation and -- yes -- pride in the United States. It was the main road to the middle class, and at its peaks contributed around 40 percent to gross domestic product (GDP) (from 1890 to 1960) and 36 percent (around 1950) to employment. Today, manufacturing contributes 12 percent to GDP, and 12 million Americans (9 percent of the workforce) are employed in manufacturing. The United States is not alone in these winnowing numbers. All over the "industrialized" world, the manufacturing base has been shrinking in very much the same fashion as high-tech and finance jobs have gained glamour and other less-compensated services kept growing. Since the 1970s, the invention of the microchip has had a lot to do with the decline. Meanwhile, manufacturing has been rising in emerging economies.

Although it started much earlier, the decline in manufacturing accelerated to alarming proportions at the turn of this century. The United States had once taken great pride in its homegrown manufacturing, but when newcomers from emerging economies arrived on the scene offering hard-to-beat labor costs, many manufacturers from textiles and shoes to electronics seemed to have lost their ability or even their will to compete. This led to rapid job losses in manufacturing, particularly in labor-intensive industries, though many other industries were barely affected.

Between 2000 and 2007, 3.5 million manufacturing jobs were lost. This staggering downturn caught the United States off guard. Manufacturing output expanded at a snail's pace of barely 0.5 percent annually in a growing economy. That was even before the Great Recession hit, which further added to job losses and factory closings. Since 2001, more than 40,000 factories (over 10 percent of the total) have closed their doors.

Many new plants in China -- even those set up by foreign investors from the United States, Europe, and Japan -- did not and still don't "steal" jobs away from the United States, but are simply a response to the growth of the emerging consumer. The global economy is not a zero-sum game. And economists do not all agree on which is more to blame -- automation or competition -- for many of the job losses. Less than half the manufacturing jobs lost were linked to new competition from, and outsourcing to, emerging economies. Of course, it made no sense to ignore much lower labor costs abroad. Competitors from China and other emerging markets were not only able to undercut prices, but they also had large markets themselves. Unfortunately, in the rush to capitalize on these efficiencies, companies often ignored some costs and overlooked many risks. What was given up in outsourcing was not adequately analyzed.

Whatever cause there is to blame, there is little question that the United States had difficulty competing with the onslaught of low-cost labor from China and other emerging markets. Deng Xiaoping, the reformist Chinese leader who turned the Maoist revolution upside down, once declared, "It does not matter whether a cat is black or white as long as it catches mice." By the early 1990s, China began to invest heavily in a race to catch up. With very low labor costs, strong ambitions, and huge investments (of nearly 50 percent of GDP) in infrastructure and manufacturing, it soon became known as the factory of the world. The massive outflow of outsourced jobs was, in essence, a knee-jerk, defensive response to millions of low-cost workers in China, India, and other emerging markets joining the global workforce during the past 20 years. The problem was not that U.S. manufacturing was doing worse but that others were getting better faster.

At the same time as other countries boosted research and development, government and corporate budgets were being cut in the United States. Bell Labs, once the gold standard for corporate innovation, home of Nobel Prize winners and numerous inventions, became a shadow of its former self. The same was true for many other corporate research centers that had been at the heart of much innovation. Instead, the focus of innovation shifted from manufacturing to information technology and social media, not to speak of the use of rocket science-type minds in creating new financial instruments that were partly responsible for the financial crisis. It may have taken a decade or two, but this short-term focus on profits in manufacturing firms, rather than a long-term focus on innovation and engineering excellence, began to hurt dramatically.

This complacency, lack of support, and diversion of innovation ultimately undercut the U.S. manufacturing industry's competitive edge. Short-term corporate thinking also played a part in outsourcing, which became a fashion, especially since the turn of the century. Low wages seemed so attractive that the costs of lower productivity, quality defects, shipping times, and higher transportation costs were sometimes ignored.

By 2011, the United States had a nearly $500 billion current account deficit -- one more in a long series. This should come as no surprise.

Countries that are not competitive in manufacturing are doomed to have large deficits because manufactured goods make up three-quarters of global trade. It could be ignored for so long only because foreign imports and exports were only such a small part of the huge American economy. At that point it really did seem as though the United States had lost its manufacturing prowess.

In contrast, manufacturing never quite went out of fashion in Northern Europe, where it remained relatively strong (especially in Germany and Switzerland) and where outsourcing due to cheap labor costs (rather than market opportunities) never really caught on as much. Indeed, Northern Europe has managed to keep a $500 billion current account surplus in recent years, even if some of that went to other European countries, mostly thanks to manufacturing exports.

American manufacturers have faced headwinds, especially during the first decade since 2000, but these seem to be coming to an end thanks to an unexpected series of true game-changers. This time around, the newest tilt in the ever-shifting sands of global competitiveness will, for a change, benefit the United States.

There is no denying that the "pull" of growing demand in emerging economies continues. Even with slower growth in emerging markets and a recovery in the United States, Europe, and Japan, the shift in the global economy toward developing nations remains intact as the emerging-market consumer is increasingly replacing the American consumer as "king." Companies recognize that their future long-term growth is tied to foreign rather than domestic markets. What has changed is that the "push" of loss of competitiveness has dwindled. It has sometimes even been reversed in the face of three unexpected developments:

Cheap energy: Shale gas gives American manufacturers a new edge and makes the United States energy independent

Fewer worries about cheap labor: Adjusted for productivity, the huge differences in labor costs have narrowed, and automation is making its impact felt.

American innovation is blossoming again: The United States may be at the cusp of a new era of manufacturing innovation that few others can match as Silicon Valley-style cooperation between universities and start-ups bear fruit, with manufacturing at a new crossroads with IT, sensors, medical discoveries, and new materials.

Cheap energy is giving American manufacturing an unexpected and massive competitive advantage (resulting in more than $90 billion in new investments in manufacturing). Estimates on how much shale gas will add to economic growth vary, but many economists believe it is at least 0.5 percent per year for the next years. This competitive boost is especially huge for petrochemicals, chemicals, fertilizers, steel, aluminum, and other energy-intensive industries. It has reshaped the plans of companies like Shell, Chevron, Dow Chemical, DuPont, Phillips 66, Williams, CF Industries, and Germany's Bayer and BASF. In many other industries, energy is an important cost factor, even more so as the labor-cost gap starts eroding. Once trucks and even trains switch from diesel to gas for fuel, transportation costs for American manufacturers will also come down, adding a further competitive advantage. All this is certainly enough to worry Asian and European manufacturers, even if some stubbornly refuse to acknowledge its impact.

This is in sharp contrast with a few years ago, when there were fears in the United States that there was little oil and gas left to explore at home, the world was running out of energy, oil prices were going to $200 per barrel, and America was becoming increasingly dependent on the Middle East. Shale gas production keeps growing, and shale oil will make the United States the largest oil producer by 2015.

Natural gas is increasingly replacing much dirtier coal for electricity, but it is also hugely important for manufacturing, which accounts for 28 percent of all gas used. This demand is projected to grow 27 percent per year between 2009 and 2035. What matters most immediately to manufacturers is that shale gas has brought down the cost of natural gas from $13 per million British thermal units (MBtu) in 2008 to the $3-5 range, making the United States one of the world's cheapest and most competitive producers. Natural gas sells for $14 to $17 per MBtu in China and Japan and for not much less in Europe. Moreover, gas at $4 per MBtu is equivalent to $24 per barrel of oil, well below the international $100-plus oil price. And the environmental issues related to fracking seem much less daunting today than when the industry started a few years ago, though they obviously need close attention.

For the first time in 37 years, not just one but four new "complex" refineries are being built (or are planned to be built) in the United States at a combined cost of around $800 million. They will again distill crude into all kinds of products, such as gasoline, diesel oil, kerosene, and specialty chemicals. Unsurprisingly, they will be located in shale-rich North Dakota, which has been buzzing with new exploration activity. The surge in shale oil production (and pipeline bottlenecks) have led to lower regional oil prices, which have given refiners higher margins and profits. And mining companies from Chile and elsewhere are now considering taking advantage of the cheap gas in the United States as they face higher costs at home. In short, the United States has become one of the most attractive locations again for energy-intensive industries.

Meanwhile, cheap labor is becoming less relevant. Currently, the biggest American manufacturing employers are food, transportation equipment, and fabricated metal products, each with about 1.4 million workers; followed by computers/electronics and machinery, with 1.1 million each. Together these industries employ 6.4 million people, or more than 55 percent of American manufacturing workers. The most labor-intensive industries (like apparel, shoes, furniture, and basic electronics) have already largely disappeared from American shores and may, in fact, make a surprising comeback (though with many fewer workers) as automated plants with sophisticated robots manned by trained machine operators are becoming competitive again.

The use of robots in manufacturing is expanding rapidly. While once expensive, unwieldy, and hard to use, today's robots are getting much cheaper, more versatile, and easier to use. Robots work 24/7, never strike, and have learned (or are programmed) to do many of the things low-cost workers used to do. One robot can sometimes do what hundreds of workers used to do. Cheap labor will not be the unique advantage it once was, leveling the playing field. Labor-intensive may, in fact, become an antiquated concept. Robots require highly trained operators, so this will not be a bonanza for many types of workers, especially those without much education.

The use of 3-D printing will also become more widespread. Rather than the traditional method of cutting, drilling, or removing pieces, it is a revolutionary new way of making three-dimensional objects (from machine tools to body parts) by adding layer upon layer with digital technology. It allows prototypes to be developed and brought into production much faster than before, cutting months and years to days or hours. It also reduces waste and allows small start-ups to get into manufacturing much more easily than before. The first of a chain of manufacturing innovation institutes that Barack Obama's administration hopes to establish (along the lines of the German Fraunhofer Institutes), the National Additive Manufacturing Innovation Institute in Youngstown, OH, will support these initiatives. It is a good example of broad cooperation by 40 major corporations, nine research universities, five community colleges, and 11 nonprofit institutions.

Over the last 10 years, the idea of cheap Chinese labor and expensive American labor has become rapidly outdated. Wages in China have risen 400 percent between 2001 and 2012, according to Ernst & Young, and the Chinese renminbi has strengthened 20 percent against the dollar while wages have barely risen in the United States during the same period. In fact, unit labor costs have come down 12 percent in the United States since 1995 (a performance exceeded only by Sweden in the developed world). Moreover, trade unions are now more flexible when it comes to work rules that once crushed efficiency, while pension and medical benefits have come under scrutiny, for example in the plane- and car-manufacturing industries. Outsourcing abroad and the move of manufacturing to Southern states have provided an impetus that did not exist before.

Furthermore, China's labor surplus of just a few years ago -- one that kept wages low and made China "the" manufacturing center of the world -- has basically evaporated.

Incredibly, the Chinese media is full of articles on skilled-labor shortages, and China's working population will be declining by 2018. Part of this can be explained by pure demographics: Chinese births are declining from 26 million in 1987 to only 15 million in 2012.

Wage costs cannot tell the full story. Productivity per worker also matters a lot. The Chinese had a lot of catching up to do in productivity. It remained at only 13 percent of that of the United States in 2008, rising from a minuscule 3 percent of the U.S. level in 1978. Meanwhile, American productivity has increased enormously. The value of manufacturing output is 2.5 times what it was in 1970, but this output is produced with 30 percent less labor.

As the wage gap erodes, productivity advantages are becoming more important. If an American factory worker is four or five times as productive as a Chinese or Indian worker, that worker's compensation can be that much higher. What economists call "total factor productivity" is among the world's highest in the United States and seems to be growing again (after a hiatus in the years after 2000) at a pace that is faster than that found just about anywhere else. Why does all this economic "stuff" matter? In the end, it is productivity that drives competitiveness, economic growth, and living standards.

Employment in manufacturing has grown faster than elsewhere in the U.S. economy since the 2008 recession. Thus far, the employment impact of 50,000 new jobs from specific reshoring initiatives has been only a trickle, comprising less than 10 percent of the 650,000 new manufacturing jobs created in recent years. But looking at both labor costs and productivity, the Boston Consulting Group expects net labor costs for manufacturing in China and the United States to converge by around 2015. It estimates that the erosion of the wage gap and reshoring could turn the trickle into a flood of 2.5 million to 5 million in job gains in U.S. manufacturing (and related service industries) over the next decade.

Add to this a new wave of American innovation in manufacturing. Scientific research in the United States remains among the most advanced in the world, and spending on R&D is the highest, though China is catching up fast. Higher education remains a trump card, with the largest number of top universities and high-quality graduates. The Chinese numbers are big, but so is China's population. In 2003, the United States graduated 456,000 scientists and engineers, compared with 617,000 in the European Union and 672,000 in China. Most observers agree that graduates of the top American and northern European universities are still well ahead of those in China.

What is new is that scientific research is climbing out of its silos, in universities as well as in the business world. Discoveries increasingly come from between the old disciplines of chemistry, biology, and physics. Insights are gained from a much more interdisciplinary approach that is gaining ground. All this requires new forms of intensive collaboration, "brains meet brains." Just as the most interesting fundamental discoveries are based on interdisciplinary research, applied research now centers on universities surrounded by major companies and innovative start-ups. Leading corporations scout for these discoveries while focusing on what they do best -- the development in R&D and the scaling-up and distribution.

Brand-new ecosystems are forming not only around the universities of MIT, Stanford, Duke, and University Texas, Austin, but in the old rust belts of New York around Albany, Schenectady, and Rochester; around Akron and Cincinnati in Ohio; and around Seattle, Minneapolis, Boulder, and all over the country.

We call this "brainfacturing," which will do to manufacturing what the PC did to mainframe computers and smartphones to computers. Building on traditional manufacturing skills, brainfacturing is based on fundamental R&D in physics, chemistry, biology, and nanotechnology. It integrates information technology, robotics, the use of sensors, 3-D printing, nanotechnology, and new materials. It will also make active use of big data in the semantic web, social media, the exploration of the human genome, and other new discoveries.

Sensors are increasingly used in everything from unmanned cars and medicine to counterterrorism, logistics, and oil exploration. Homeland security needs have given American innovators and manufacturers an early lead in this area. New materials allow planes to be lighter, hip implants to last longer, batteries to function better, soldiers to be better protected from explosions, and medicines to be better absorbed.

The U.S. government has invested $3.7 billion in nanotechnology, substantially more than other countries. Nanotechnology is engineering at the molecular scale, constructing items from the bottom up, and making all kinds of new materials and pharmaceutical products that were unthinkable until recently. There are over 1,500 nanotech products already (from sunscreen to coatings and food), with three to four more coming out each week. And finally, the mapping of the human genome and brain mapping will allow highly customized medical treatment -- a form of targeted bombing instead of carpet-bombing. Biomanufacturing will become a new branch of advanced manufacturing. Together with sensors and the expanded use of IT, it has the potential to revolutionize health care and even bend the feared cost curve that is at the root of projected massive future budget deficits and rising health-care costs. This would be a triple win for manufacturing.

The $14 billion Albany NanoTech Complex is just one example of how innovation in critical areas is moving back onshore. This huge research facility with $1 billion in funding from New York state has 800,000 square feet of labs, clean rooms, and classrooms for over 3,000 R&D scientists, researchers, and engineers. Over a decade ago, much of the semiconductor industry moved to South Korea and Japan, but Albany is now again at the cutting edge of the next generation of semiconductors. On-site, corporate partners like IBM, Applied Materials, and Intel work together with Samsung, TSMC, and Toshiba. Nearby, GlobalFoundries, a leading independent fabricator of semiconductors, has built a brand-new plant.

Virtually every existing product will be made in entirely new ways, and millions of innovative new products that we can only dream about today will be made on the basis of cutting-edge research. None of these is an American monopoly or, for that matter, will remain one, but in many cases, American innovators and manufacturers have an early start and competitive edge.

In its 2012 "Report to the President on Capturing Domestic Competitive Advantage in Advanced Manufacturing," the President's Council of Advisors on Science and Technology called for a national advanced-manufacturing strategy, including a network of regional manufacturing innovation institutes to bridge the gap between research and commercial applications. Slowly, this is now beginning to happen.

What started two decades ago with sporadic spinoffs from scientific research at universities like Stanford, Harvard, and MIT has become a trend in the United States and abroad. In northern Europe, universities in Zurich, Lund, Stuttgart, and Eindhoven have also become centers of a network in which companies and local authorities closely cooperate so that start-ups are no longer a rarity but are becoming a major source of new employment.

Factory floors will be different in the future and so will factory workers. In fact, post-digital factories will be largely unrecognizable and often much smaller. The large factory floors we remember from movies and economics textbooks do not exist anymore; indeed, fewer than 200 plants in America employ more than 2,500 workers. The decline has been much steeper in large plants than in small plants. The heart of traditional manufacturing -- production-line workers or "team assemblers" -- now represents only 6 percent of manufacturing jobs. Of the 330,000 factories in the United States, the vast majority employ fewer than 10 workers.

In the process, there is a relentless shift to higher skill requirements. Workers with only high school degrees or less (53 percent in 2000) have been the biggest victims of job losses. This trend has continued in the recovery from the Great Recession. In contrast to the loss of millions of manufacturing jobs, the number of manufacturing "workers" with graduate degrees has increased 13 percent since 2000, despite their much higher compensation.

Many companies now face a shortage of trained operators -- workers with vocational training. In this area, American manufacturers and policymakers have a lot to learn from northern Europe, especially Germany, with its system of apprenticeships and vocational training that has made the Stuttgart area one of the largest export centers globally. In the world of modern manufacturing, the quality of high school education, vocational training, and cooperation with local community colleges and R&D centers at the top local universities matter. Increasingly, they make the difference between success and failure.

Science and industry must work together to deal with the big issues that confront us. Increasingly, knowledge is organized around concepts like sustainability, mobility, urbanization, and aging of the population that affect everything from food and water to energy and materials.

The winners in global manufacturing over the next decades will be those who figure out how to make not just what the American, European, or Japanese consumer wants but what more than a billion new, emerging consumers want. Those needs are no longer just food but safe and healthy food, not clothing but fashion, not simple mobile phones but smart multifunction wireless devices, not a roof above your head but energy-efficient buildings, not gas-guzzling cars but self-driving electric and other vehicles, not chemotherapy but DNA-based, highly targeted medicines. The innovation embedded in every product will grow, and the labor content will decline.

This will create a new edge for smart companies in the United States that take advantage of the universities and the innovative high-tech corporate culture around them. That will be true for small start-ups and for adaptable multinationals alike. From Procter & Gamble to Caterpillar, corporations have long understood that their markets are global. They have seen their growth and profits come increasingly from emerging markets as the emerging consumer overtakes the American consumer. The global crisis shook them out of any remaining complacency, and a new, smarter form of competition is now getting noticed in Asia and elsewhere. Many have learned their lesson fast and are now challenging emerging multinationals in the same way that these new competitors challenged them earlier.

During the last decade, the United States probably lost nearly 2 million jobs to outsourcing and other competition from emerging markets. Because of differences in labor productivity, the country created far more jobs abroad than it lost at home. As Andy Grove, the former chief executive of Intel, has remarked, high-tech innovation led to job creation in manufacturing, but in emerging markets rather than in the United States. But over the next decade, the Boston Consulting Group estimates that 3-5 million new jobs are likely to be created because of shale gas, reshoring, and brainfacturing. As discussed, most will come from the new energy advantage and the erosion of the wage gap. Brainfacturing will transform manufacturing and even the service sector. It will probably help stimulate the economy and the economy's competitive edge more than job growth because it will add few if any net jobs to the factory floor. Those with professional training, strong STEM (science, technology, engineering, and mathematics) skills, and postsecondary degrees will benefit but, even as automation will require more trained operators, it may hurt rather than help workers without advanced training. It will, however, create jobs for salesmen, managers, and others.

Only if new innovations in materials and production processes continuously add greater value again at home will the new manufacturers stay ahead of the competition that inevitably will follow. With game-changers providing a tailwind, American manufacturers have another big chance to be at the competitive edge again -- but not a guarantee of success. We are still underestimating how shale gas, robots, demographics, scientific breakthroughs, and knowledge-economy barriers are dramatically transforming who is ahead and who is behind. Rather than being defeatist, we should have a strong sense of optimism and confidence in American manufacturing. Increasingly, it will sink into the national psyche that the glass is not half-empty but half-full. Made in America is back in America.