PARIS — A phalanx of soldiers wearing bulletproof vests and wielding machine guns fanned out beneath the Eiffel Tower on a recent afternoon, scanning the crowd for potential terrorist threats. Across the country, nearly 10,000 more armed troops patrolled streets around landmarks, stores and government buildings.

France is spending nearly 1 million euros a day on the heightened security, part of a renewed surge in European military spending as governments declare terrorism a permanent risk.

Europe’s current approach to fighting terrorism, after two deadly assaults carried out by Islamic militants in Paris last year, represents a shift from the austerity mantra that has dominated the region since the debt crisis in 2010. While countries are not abandoning their fiscal discipline, leaders are encouraging a more flexible approach, to give them financial firepower to counter the growing threat.

“We need to track the terrorists, dismantle their networks, cut off their financing and stop propaganda and radicalization,” President François Hollande said recently, after declaring France “at war” with terrorism. “The security pact takes precedence over the stability pact,” he added, referring to the European Union’s rules limiting member nations’ deficits.