PARIS — U.S. President Donald Trump may have upended the international world order, but it’s French President Emmanuel Macron who has turned America First to his advantage.

In recent months, Macron has become increasingly active on the world stage. He played a key role in brokering an agreement over EU top jobs, launched a risky diplomatic initiative on Iran, reinvigorated efforts on Ukraine and hosted a G7 summit that at least managed to preserve the unity of the seven, unlike its two predecessors.

The French president’s effort to carve out a role as the essential middle man in global diplomacy is based partly on clear confidence that he can handle two temperamental peers: Trump and Russian President Vladimir Putin.

The jury is out on whether Macron will ultimately succeed with any of his foreign policy forays. So far, he has little to show in terms of concrete results. His previous efforts to win over Trump (on the Iran nuclear deal or climate) and Putin (on Syria and cyberwarfare) came up short and didn’t shield him from the Twitter wrath of the White House resident-in-chief.

Two summits he held on Libya garnered little more than headlines and not only failed to improve the situation on the ground but were seen as counterproductive by some European officials.

Longer term, Macron will be judged on whether he can make progress on protracted problems such as relations with Iran and the conflict in Ukraine.

Nevertheless, Macron, whose foreign policy chops were among his biggest weaknesses at the start of his term in 2017, has seized on Trump’s retreat from the multilateral arena, Britain’s Brexit funk and German Chancellor Angela Merkel’s political twilight as an opening to bolster France’s diplomatic dealmaking credentials, even if they’re still no match for American might.

“The role of France is to be a mediating power … our unique role is to speak with everyone … and try to build useful solutions on a universal level,” Macron told reporters at the end of the G7 summit in Biarritz.

France has, of course, long played a leading role in international diplomacy. The country’s status as a nuclear power, its robust military and its permanent seat on the U.N. Security Council all give it clout that other countries — even the more economically powerful Germany — can’t match.

But Macron has made a concerted effort to step it up a gear.

“Not since the [2015] Paris climate agreement has France played such a central role in international diplomacy,” said Michel Duclos, a retired French ambassador who served in Russia, New York and Syria and is now a senior adviser at the French think tank Institut Montaigne.

“There aren’t many leaders who are able to expose themselves like he does, or assemble the conditions for action like he has” — Senior French diplomat

So far, Macron’s efforts to fill the void left by the U.S. have not upset other big European powers such as Germany and the U.K. Some diplomats in those countries even admire Macron for stepping up to the plate.

“Macron is occupying that space, and he’s coming up with ideas,” said a high-level British diplomat.

“There’s someone ready to take risks, and he was rewarded somehow in the context of the G7,” said a German diplomatic official.

At that summit, Macron managed to keep Trump on side, even when he allowed Iranian Foreign Minister Javad Zarif to fly into Biarritz for talks as the leaders were still meeting, and Trump was across the street. He also engaged in a headline-grabbing spat with Brazilian president over the Amazon.

The concrete results of the summit were more modest — including an aid package for the Amazon and limited progress on digital tax. But longer term, Macron will be judged on whether he can make progress on protracted problems such as relations with Iran and the conflict in Ukraine.

Iran plan

Perhaps no other issue illustrates Macron’s newfound international role more than Iran, arguably the most complex international crisis at the moment. The diplomatic effort he has been leading since June has at least had the merit of still being alive and kicking, unlike a previous attempted mediation by Japan.

“Macron has acquired personal credibility on this,” said a senior French diplomat. “There aren’t many leaders who are able to expose themselves like he does, or assemble the conditions for action like he has.”

French officials said this week they have been discussing with both Iranian and U.S. officials the possibility of an oil-backed credit line for Tehran, in what could be the most concrete breakthrough to both stop Iran from further breaching the nuclear deal and prepare the way for a summit meeting with Trump.

In return for the credit line, Tehran would have to fully comply with the 2015 nuclear deal and commit to not threatening security in the Gulf or impeding freedom of maritime navigation. The country would also have to agree to future talks on Middle East security and on more long-term nuclear arrangements, French Foreign Minister Jean-Yves le Drian said Tuesday. The credit line would be guaranteed by Iranian oil.

But while diplomats may admire Macron’s chutzpah, the reception to the French proposal in Washington underscores how hard it will be to turn his audacity into concrete results.

“There’s no appetite for the credit line idea — at least the French version as we know it now,” said a U.S. official.

But, ultimately, it is Trump who will decide whether Macron’s efforts succeed. As the U.S. official added, “The big question is, ‘What the hell’s in Trump’s mind?’”

Macron has made clear he believes that only engagement with Moscow will contribute to resolving some of the biggest challenges facing Europe.

Macron hasn’t spared any effort in trying to keep Trump happy.

Seizing on the U.S. president’s penchant for big deals and historic meetings, Macron and his team are hoping he will sign off on the credit line if it meant he could get a summit meeting with Iranian President Hassan Rouhani, possibly in a few weeks at the United Nations General Assembly.

“All this won’t work unless at some point Rouhani accepts to see Trump,” said the senior French diplomat. “If they refuse it won’t happen.”

Macron has been personally invested in the negotiations. He has had six phone conversations with Rouhani about the nuclear deal since the end of June. Senior Iranian officials have visited France four times in the last month, and Macron’s diplomatic adviser has paid two visits to Iran and traveled as far as China and India in support of French efforts to reduce tensions.

The French president is advancing in a minefield. The Trump administration is deeply divided between hard-liners, like National Security Adviser John Bolton, who believe in pursuing unbridled pressure on Tehran, and Trump and a few other officials who feel there might be an opening to make a deal.

Iranian authorities are just as divided, between the president’s camp and the uncompromising Revolutionary Guards. Israel and Saudi Arabia have also been less than enthused by the idea of a softer line with Iran.

Russia risk

Another fraught arena in which Macron has doubled down is Russia. He recently called on his diplomatic establishment to “rethink our relationship to Russia” and “build a new architecture of trust and security in Europe,” one that includes Moscow.

Despite continued Russian cyberattacks, Moscow’s participation in bombing campaigns that have killed civilians in Syria and the poisoning of Russian citizens living in the U.K., Macron has made clear he believes that only engagement with Moscow will contribute to resolving some of the biggest challenges facing Europe, starting with Ukraine.

Macron hosted Putin at his summer retreat in the south of France in the run-up to the G7, and announced afterward that the Russian and Ukrainian presidents were ready to move forward with a prisoner exchange and the demilitarization of the Donbas region as confidence-building measures ahead of a planned summit meeting with France and Germany later this month in Paris.

Last week, a prisoner exchange seemed to be close, but the initiative then faltered.

Macron’s outreach to Putin hasn’t gone down well with everyone. Ukraine’s leaders resent the idea that there should be any compromise with Russia, which they see as the clear aggressor in the conflict. Other Central and Eastern European governments are also wary of anything that could be seen as cozying up to Putin.

“I am extraordinarily skeptical of his overall approach toward Russia and the language he uses with Russia, because I think it is doomed to fail,” said Bruno Tertrais, deputy director of the Foundation for Strategic Research in Paris. “The language used publicly by Macron about Russia is in my opinion out of place and counter-productive because it seems to say that the errors are mainly Western and that it’s all misunderstandings.”

But the supremely self-confident Macron, who started out as a long-shot candidate before upending France’s political establishment to claim the presidency, seems to be banking on his political and personal skills to reset relations with Putin.

“He persists, it’s how he won the presidential election,” Tertrais said. “But I do not think that his personal qualities will be sufficient to transform our relationship with Russia.”

Nahal Toosi in Washington contributed reporting.