Copyright The New York Times

The global economy has been good to Poland. After the Berlin Wall fell in 1989, Poland’s economy was crawling along the bottom of lower-middle-income countries, with 900 percent inflation. Today, Poland is the newest member of a trillionaires club of nations with economic outputs exceeding $1 trillion. But the global economic system that set the stage for what’s known as the Polish miracle is crumbling. President Trump’s enmity toward once-close allies has led to tariffs and restrictions that are rewiring trade and unsettling industries from autos to agriculture. Military buildups rather than economic cooperation are being relied on to maintain security. And China, once viewed as a source of cheap imports and market opportunities, is perceived as a menacing economic rival. The question now is whether Poland — and other European countries that benefited from an era of international collaboration — can sustain momentum in the new order taking shape. Particularly when Russian aggression shows no sign of waning, global growth is slowing, energy prices are rising, and White House policies can change between breakfast and dinner. “People are wondering if it is the end of the golden age or not,” said Pawel Pustelnik, chief operating officer of the tech firm Future Processing and vice president of the Software Development Association in Poland. “It is a difficult moment for us.” Future Processing was founded in 2000 as Poland was transforming its economy. The company, started in the home of an entrepreneur, Jaroslaw Czaja, has grown into a $70-million-a-year enterprise with 800 employees. Its sleek headquarters in Gliwice in southern Poland are, fittingly, built on an abandoned coal mine that has been converted into a business and educational center. Instead of blackened coal slag and excavators, the site features a preschool for employees’ children and padel ball courts. The center’s roadways and parking lots are being used to test self-driving buses being developed by another of Mr. Czaja’s start-ups, Autonomous Systems. A second test site is a large cemetery in Wroclaw, where bright green minibuses ferry visitors — not bodies, in case you were wondering — to and from gravesites. Membership also required the adoption of legal and regulatory standards that strengthened the nation’s institutional backbone. And Poland was given access to Europe’s single market, which caused a surge in foreign investment, industrial development, and an exchange of knowledge and talent. Over the years, Poland developed a diversified economy with vibrant agricultural, health, automobile, technology and financial services sectors. A central European location, well-educated labor force and large consumer market of 38 million people also contributed to its success. “The Polish domestic market is big enough for us,” Szymon Janota, chief executive and a co-owner of Graylight Imaging, which is developing artificial intelligence systems to analyze medical scans and detect coronary artery disease. From 1995 to 2024, Poland’s economy tripled in size, and is still one of the fastest growing in Europe. The outlook, of course, darkened after Russia attacked Ukraine in 2022. The invasion delivered a gut punch to the continent’s economy as the flow of cheap Russian energy dried up as well as to the larger economic system that had paved the way for shared growth. Like the rest of Europe, Poland has been struggling with high energy costs, burdensome European Union regulations and increasing competition and pressure from both the United States and China. The unraveling of the international order has sped up since Mr. Trump imposed punishing tariffs on Europe and weakened America’s once-unquestioned security guarantees. “We don’t know how this will play out in the long term,” Pawel Cygan, managing director of Kirchhoff Polska, a car parts manufacturer, said of the tariffs. “In the short term, however, the risks haven’t really materialized yet.” A pending trade agreement with Latin American countries — part of an E.U. push to develop other global markets — could also have negative effects for Poland. Cheaper imports of poultry and grains from those countries will compete with Poland’s agricultural producers both at home and in Europe. For Poland, the war next door has been particularly traumatic, which was underlined recently when the North Atlantic Treaty Organization had to shoot down a swarm of drones presumably from Russia. Warsaw has built up its military to counter the Russian threat. Its armed forces are larger than Germany’s, France’s or Britain’s. By next year, Poland will be the first country in the Atlantic alliance to spend 5 percent of its total income on defense. There are costs. The budget leaves less money for social or economic programs and raises the national debt. And because most of the spending will go to purchasing weapons and equipment from other countries, particularly the United States, the economic impact will be limited. Anxiety about the war has also caused some foreign investors to delay or abandon projects, said Michal Boleslawski, the chief executive of ING Bank Poland. Russia’s aggression has prompted shifts in government and European Union rules that had restricted tax exemptions and other preferences for defense-related companies. Now, three military-related ventures are likely to replace the companies that withdrew from the Katowice zone, said Rafal Mackowski, head of the zone’s investor relations. More important are the more than one million Ukrainian refugees who have settled in Poland, an enormous influx of workers and taxpayers, said the former finance minister, Mr. Balcerowicz, now a professor at the Warsaw School of Economics. Poland, helped by a combination of cultural affinity, immigrant networks and common languages, has done the best job of integrating the new arrivals in Europe, he said. Iteo, a software and A.I. consulting firm in Katowice, has hired five Ukrainians who fled the fighting. One is now a team leader, said Jerzy Kufel, the founder and chief executive. “Immigrants have boosted the economy and the work force skill set,” he said. According to a June report from Deloitte for the U.N. Refugee Agency, Ukrainian refugees increased the country’s gross domestic output by 2.7 percent, more than $27 billion, and made the work force more productive.