Poland is on a military spending spree. Since January, Warsaw has announced that it would negotiate a $7.6 billion missile deal with the arms-maker Raytheon, that it would purchase a number of new helicopters and tanks, and that it is considering buying as many as 100 more fighter planes. In the coming years, it plans to procure over 1,000 military drones and five new naval ships. These plans are part of a $14.5 billion military modernization program that Warsaw announced in late 2016—and thanks to them, Poland is poised to play a key role in defending Europe.

The spending hasn’t come out of the blue. Poland needs to replace its remaining Soviet-era military equipment and even some of the hand-me-downs it acquired from Western neighbors in the early 1990s. Russia’s current aggression in the Baltic Sea region—earlier this month, it moved Iskander missile systems to the exclave of Kaliningrad, from where they can reach Warsaw—have added to the sense of urgency in Poland. “If you happen to live in a rough neighborhood, you invest in a proper lock and maybe even in pepper spray,” Aleksander Korab, a Polish newspaper editor now in charge of the U.S. daily Metro, told me. “We Poles learned the hard way that the only way to stop the bully is to stand up and arm yourself.”

Polish soldiers during a welcoming ceremony for NATO's Enhanced Forward Presence combat battalion in Adazi, Latvia, June 2017. Ints Kalnins / REUTERS

Unlike most European countries, Poland didn’t slash defense spending during the 1990s, and in recent years, it has upped its game. In 2015, Poland spent 2.2 percent of its GDP on defense, according to statistics from the Stockholm International Peace Research Institute. Last year, it spent two percent, NATO’s benchmark. This week, President Andrzej Duda signed into law the government’s decision to gradually raise defense spending each year until 2030, when those expenditures will reach 2.5 percent of Poland’s GDP. That’s a higher share than any other NATO member pays today, except for the United States.

What’s more, Poland has a large, competent military—and over the next several years, the government plans to expand its ranks from 100,000 to 150,000 service members, while also adding a 50,000-troop-strong volunteer force.

One hundred fifty thousand professional troops: that is more than any European country has except for France, Germany, and the United Kingdom. Yet none of those states are well positioned to do much more for European security in the immediate future. France’s armed forces have major obligations in Africa as well as in domestic security, the British military is overstretched and underfunded, and Germany’s Bundeswehr is struggling with equipment problems: none of its submarines, for instance, are currently in working order.

Over the next several years, the Polish government plans to expand the military from 100,000 to 150,000 service members.

That leaves Poland as the best European candidate to play a deeper role in the continent’s defense, particularly on NATO’s eastern flank. Warsaw is developing closer defense ties with Estonia, Lithuania, and Latvia, where 160 Polish soldiers serve as part of a NATO battle group. It has committed troops to the alliance’s new multinational brigade in Romania and hosts NATO’s new Multinational Division Northeast, which coordinates NATO troops operating under the auspices of the alliance’s so-called Enhanced Forward Presence in Poland and the Baltic states. According to the German newsmagazine Der Spiegel, Poland is also competing with Germany to host NATO’s new Rear Area Operation Command, which will serve as the alliance’s European logistics hub. That would bring even more NATO units to Poland, where around 1,270 troops are stationed today. In June, Tomasz Szatkowski, the under-secretary of state in Poland’s Ministry of Defense, went further, suggesting that Poland become a hub for NATO operations, hosting what would essentially be a beefed-up version of NATO’s Rear Area Operations Command. During the Cold War, West Germany filed that role, having not only good infrastructure but a frontline with the Warsaw Pact. Today, Poland is closer to a potential conflict involving Russia.

According to Lukasz Kulesa, the Warsaw-based research director at the European Leadership Network (a London think tank where I am a nonresident fellow), Poland is also considering integrating units from allied countries into its armed forces and attaching its own units to other countries’ militaries. This model, which is being pioneered by Germany, is known as the Framework Nations Concept and involves two or more states integrating selected units from their armed forces, allowing them to share troops and equipment and thus increase their strength. (A Polish government source confirmed Poland’s ambitions with respect to military integration.) “Poland has great potential as a framework nation focused on the defense of the eastern flank, which is not equally interesting to all NATO members,” Kulesa said. “The Multinational Division Northeast headquarters seems a perfect core around which the idea can be developed.”

NATO Secretary General Jens Stoltenberg and Polish President Andrzej Duda in Warsaw, August 2017. Agencja Gazata / Slawomir Kaminski via REUTERS

Jim Townsend, a former U.S. deputy assistant secretary of defense for European and NATO policy, agrees. “The Polish armed forces have had a hard road transitioning from their Warsaw Pact state to where they are now, with a Western approach and Western equipment,” he told me. “Now they’re in a position where they can take on a larger role, whether it be as a framework nation or something else.”

Poland clearly has the capacity for heavier lifting: its European partners should simply ask. In addition to potentially hosting NATO’s new logistics command and integrating its forces with those of other NATO partners, Poland could deploy many more soldiers on NATO missions. But there is a catch. Since taking power, the PiS government has alienated other European states through a series of domestic measures widely viewed as illiberal. “The PiS government has managed to isolate Poland from most of its partners in the EU, and therefore in the European part of NATO,” said Roland Freudenstein, the deputy director of the Wilfried Martens Center, a Brussels-based think tank. “If Poland’s current leaders don’t change course and become more constructive on the European political stage, they’re bound to annihilate the impressive military and political achievements of previous governments, which would make it very difficult for Warsaw to play a positive role in European security.”

Indeed, the standoff between Warsaw and its European partners over the Polish government’s domestic policies could affect Poland’s potential star turn in European security. In July, after Warsaw proposed a series of reforms to increase PiS lawmakers’ control over the judiciary, the European Commission threatened Poland with so-called Article 7 proceedings, which can strip their targets of EU voting rights. But considering that no other European country is able to significantly augment the region’s defense, Poland’s European partners should get over their pique. To do more for its own security, Europe needs to look east of the river Oder.