PARIS — French voters face a stark choice on May 7 between retreating into isolationism or taking the lead in shaping a European defense policy to respond to Islamic terrorism, an unstable neighborhood, a resurgent Russia, an uncertain America and a rising China.

France prizes its strategic autonomy but can no longer afford to go it alone as a pocket superpower. That means the two options represented by the finalists in the presidential election — independent centrist Emmanuel Macron and anti-EU nationalist Marine Le Pen — represent a crucial fork in the road when it comes to France's defense and foreign policy.

Macron, the front-runner and most pro-European of the 11 first round contenders, advocates closer European defense integration compatible with NATO as part of a strengthened EU and eurozone. Le Pen wants to pull France out of NATO's military wing, restore border controls, abandon the euro and call a referendum on France’s EU membership, raise protectionist trade barriers and pursue a strictly national defense policy.

If Macron wins, he has a historic opportunity to lead Europe in defense provided he eschews traditional French arrogance toward smaller EU countries and embraces a more comprehensive approach to security that combines "hard security" with diplomacy, development aid, open trade and institution building. He will also need to jettison a half-baked campaign promise to restore a one-month compulsory military service period for all young French people, which would be costly and yield no extra military capability.

The 39-year-old political novice may also have to face down resistance in the high command, political establishment and defense industries to closer EU cooperation on defense policy, arms production and military technology.

France’s security horizon has darkened in the wake of a spate of terrorist attacks on French soil and threats to French citizens and interests abroad.

Over the last decade, France’s political clout in Europe has declined relative to Germany's due to its economic stagnation. In that time, Paris has also engaged in more overseas military operations than any other EU country, including conflicts in Libya, Mali and Syria, NATO and U.N. missions, and numerous covert commando actions. And its armed forces have taken on an expanded role in domestic security in the wake of the 2015 terrorist attacks in Paris.

The "cheese-eating surrender monkeys" — derided by U.S. neo-conservatives after Paris opposed the 2003 invasion of Iraq — have become "the frogs of war," an uninhibited interventionist force and go-to partner for the United States in Africa and the Middle East.

Britain's impending departure from the European Union will soon leave France as the only major military power in the 27-nation union with a U.N. Security Council seat, a nuclear deterrent, NATO membership, battle-hardened forces configured for expeditionary warfare and a full-spectrum defense industry, sustained partly by booming arms exports.

But France’s military activism has taken its toll, over-stretching the armed forces and their equipment, and prompting critical questions about strategic priorities. Paris is also feeling the pressure for greater defense spending and more military and armaments cooperation with European allies and NATO partners.

The next occupant of the Élysée Palace will inherit tough security choices and limited resources.

On top of long-term risks related to climate change, migration and the instability of an incomplete eurozone, France’s security horizon has darkened in the wake of a spate of terrorist attacks on French soil — most recently on Paris’ Champs-Élysées last week — and threats to French citizens and interests abroad inspired by jihadi groups with bases in Syria, Iraq, Libya and the Sahel.

The advent of an "America first" U.S. president has cast doubt on the U.S.' strategic guarantee for Europe and on its historic support for the EU and for open trade, raising the possibility that Europe will be left in the lurch when it counts.

Brexit, meanwhile, has thrown the future of France’s most important bilateral defense partnership in Europe into uncertainty. Even as both countries have vowed to continue cooperation, whether the U.K. will stick to its commitments remains to be seen. And Russian President Vladimir Putin's annexation of Crimea, destabilization of Ukraine, military buildup and provocations, and suspected use of cyberattacks to undermine Western democracies also loom large.

Due to both geography and demography, the most urgent threat in French eyes is overwhelmingly seen as the nexus between radicalized, poorly integrated young Muslims in France, mostly of immigrant background, and the rise of jihadi groups in the Middle East and Africa.

For Paris, the priority will be to build up intelligence, cybersecurity, specialized internal security units and rapidly deployable combined arms special forces rather than large conventional armed forces.

But France's ambition to remain a global power also dictates continued investment in naval forces, satellites and the nuclear deterrent, on which there is a virtual national consensus among parties, aside from the far left.

The next president has four main options to address these challenges.

The cavalier seul (lone ranger) model would see France do as much as it can on its own, militarily and industrially. It would try to retain a full-spectrum technological and industrial capacity since most European partners don't share its strategic priorities or appetite for expeditionary warfare. But with a defense budget of €32.7 billion or 1.79 percent of GDP, excluding pensions, it’s unlikely the country can afford to go it alone.

Alternatively, France could give top priority to creating an EU defense capability that takes action where NATO chooses not to engage. French support for a permanent structured defense cooperation in an EU framework could finally give the idea — which would include a European defense fund and operating out of a joint EU headquarters — lift-off, but could be difficult to sell to an increasingly Euroskeptic public in France and Europe more widely.

A variation on this option is European bilateralism, whereby France gives priority to bilateral or trilateral defense cooperation with major European partners outside the EU framework. It would build military and industrial ties with key allies such as Britain, Germany, Italy, Spain and if possible Poland, maximizing French power and leverage while avoiding EU procedural obstacles and bureaucracy.

The often-floated idea of building up a “European pillar” of NATO might avoid duplicating military headquarters and staff and has the benefit of relying on a trusted framework with common standards that binds the U.S. to European security — but given enduring Gaullist resentment of U.S. hegemony, Paris is unlikely to go for it.

Le Pen has made clear she aims for option No. 1 — going it alone. She wants to jettison NATO, unravel the EU and seek closer strategic cooperation with Russia. She vows to raise defense spending to 2 percent of GDP immediately and to 3 percent by the end of her term. But it is not remotely clear how she would find the extra money, especially given the likely damage her isolationist economic policies would have on the French economy.

Macron may not have a free hand in parliament and will likely face heavy opposition to giving EU institutions a greater role.

Macron has pledged to raise defense spending gradually to 2 percent of GDP by 2025, a slower rate of increase than experts say is required. He advocates deeper European defense cooperation to supplement NATO's role and share the financial burden. But he may not have a free hand in parliament and will likely face heavy opposition to giving EU institutions a greater role in an area traditionally core to national sovereignty.

If elected, he should give priority to developing a long-term defense program with Germany, open to other partners including Britain if it wishes, with a timetable for key capability improvements such as more airlift, air-to-air refueling planes and reconnaissance drones, and a commitment to developing future systems such as fighter planes and aircraft carriers jointly in Europe.

Such an effort will require strategic patience and will only work if it is part of a grand bargain with Berlin to strengthen the eurozone and implement long-overdue economic reforms. Macron should be wary of overpromising on EU defense integration and risk under-delivering on an issue that is key to citizens’ safety — and strikes at the core of voters’ identity at a time when they feel under threat.

Paul Taylor writes POLITICO's Europe at Large.

This article is based on a report "Crunch Time — France and the future of European defense," published by the Friends of Europe think tank on April 25.