BIARRITZ, France — President Trump capped days of advocacy on behalf of Russian President Vladi­mir Putin by announcing here Monday that he intends to invite the leader to the Group of Seven summit in 2020, which Trump will host in an election year amid warnings that Russia is actively trying to interfere again in the U.S. presidential election.

The effort would soften Russia’s pariah status and potentially bring it back into an elite club of some of the most powerful industrialized nations that lent Putin prized international legitimacy during the 14 years he attended. Russia was booted following its 2014 annexation of Ukraine’s Crimean Peninsula, slimming the Group of Eight by a member.

“I think it would be better to have Russia inside the tent than outside the tent,” Trump said at a news conference Monday at the summit’s conclusion.

Trump’s extraordinary promotion of Putin proved to be the most tense disagreement over three days of contentious meetings at this year’s G-7 in the French oceanside resort town of Biarritz. The U.S. leader’s wish to restore Russia’s legitimacy was in keeping with his long-standing role as a Putin cheerleader and apologist, but it was coolly received by other leaders at the gathering.

In 2014, the United States and other G-7 member nations jointly declared Russia’s annexation of Crimea a violation of international law. But on Monday, Trump blamed the Crimea crisis on former president Barack Obama, not Putin, and alleged Obama was determined to kick Russia out of the G-7 because it was “very embarrassing to him.”

“President Obama was pure and simply outsmarted,” Trump said. “They took Crimea during his term. That was not a good thing. It could have been stopped, it could have been stopped with the right, whatever. It could have been stopped, but President Obama was unable to stop it, and it’s too bad.”

As host of the G-7 summit in 2020, Trump could unilaterally invite Putin or any other foreign leader as a special guest. Trump said Putin would be welcome and even expressed sympathy for the awkwardness the Russian leader might feel over his banishment.

“Would I invite him? I would certainly invite him,” Trump told reporters. “Whether or not he could come, psychologically, I think that’s a tough thing for him to do,” he added, saying Putin was “a proud person” and that it would be difficult for him to return to the gathering if he was not fully embraced by the other leaders at the meeting.

The repeated push was noted cheerfully by Russian state television on Monday evening, with one program on the powerful Rossiya-1 network playing a triumphant soundtrack as it showed six recent video clips in which Trump demanded Putin’s return.

But Russian officials did not immediately leap at the open door.

“Russia does not reject any communication formats, but is not going to push its participation on anyone,” said Kremlin spokesman Dmitry Peskov, according to Russia’s Interfax news agency.

In the years since 2014, Putin has done nothing to repent for seizing Crimea, nor has he met the preconditions set by the G-7 members for Russia’s readmission, which include de-escalating the conflict in Crimea and respecting Ukraine’s sovereignty.

In fact, Russia has continued its aggression in Ukraine. It also has supported Bashar al-Assad in the Syrian civil war, including his regime’s slaughter of civilians; interfered in the 2016 U.S. election to help Trump win, a violation of U.S. law; and was accused by Britain in 2018 of poisoning a former Russian spy along with his daughter because the spy had switched allegiances to the West.

Bringing back Russia would give a stamp of approval to the bad behavior, officials and analysts said.

“To invite Russia back into the G-7, since Russia has fulfilled none of the preconditions laid down in 2014, is essentially saying that Russia has gotten away with what it did in Ukraine and is not going to suffer all the consequences,” said Angela Stent, a Russia expert at Georgetown University who recently wrote “Putin’s World,” a book about his foreign policy.

At the Biarritz summit, Trump punctuated almost every public appearance with his desire to bring Putin to the meeting in the future.

Other leaders knew the push was coming, although some advisers said they did not expect he would bring it up so forcefully. European Council President Donald Tusk, a former Polish prime minister who has little sympathy for Russia, tried to head it off even before Trump touched down in Biarritz.

“One year ago, in Canada, President Trump suggested reinviting Russia to the G-7, stating openly that Crimea’s annexation by Russia was partially justified. And that we should accept this fact. Under no condition can we agree with this logic,” Tusk told reporters on Saturday.

“When Russia was invited to the G-7 for the first time, it was believed that it would pursue the path of liberal democracy, rule of law, and human rights,” Tusk added. “Is there anyone among us who can say with full conviction, not out of business calculation, that Russia is on that path?”

The leaders sat down Saturday evening for their first joint meeting — a dinner of Basque specialties at the foot of the landmark lighthouse of Biarritz. The meal started normally, with a discussion of the fires in the Amazon. It moved on to containing Iran’s nuclear threat. But it went off the rails when Trump blasted leaders for not including Russia.

Trump’s message was that “it doesn’t really make sense to have this discussion without Putin at the table,” according to a European official briefed on the conversation among the leaders.

The official, like others, spoke on the condition of anonymity to discuss the sharp discussions at the summit.

The entire 44-year vision of the G-7 gathering, according to the non-U. S. participants, is to hash out global issues among like-minded democracies. So the discussion quickly turned even more fundamental: Whether the leaders should assign any special weight to being a democracy, officials said.

Most of the other participants forcefully believed the answer was yes. Trump believed the answer was no. The pushback against him was delivered so passionately that the U.S. president’s body language changed as one leader after another dismissed his demand, according to a senior official who watched the exchange. He crossed his arms. His stance became more combative.

“Here, there is a fundamental difference of views,” one official said.

“Rough and tumble,” said another.

On Sunday morning, British Prime Minister Boris Johnson told French President Emmanuel Macron, pumping his fist, “You did very well there last night. My God, that was a difficult one.”

“Bien joué,” the newly elected British leader said in private comments that were caught on an open microphone, using the French phrase for “well played.”

Not every leader pushed against Trump, officials said. Japanese Prime Minister Shinzo Abe was neutral, as was Italy’s acting prime minister, Giuseppe Conte. 

But having such a forceful advocate for an authoritarian leader inside the room of democracies profoundly shaped the overall tone of the summit, one senior official said.

“The consequence is the same as if one of the participants is a dictator,” the official said. “No community of like-minded leaders who are pulling together.”

Trump’s push has puzzled Russia experts in the United States.

“I find this whole discussion completely ridiculous,” said Michael McFaul, who was a U.S. ambassador to Russia under Obama. “Putin did not outsmart Obama. Putin invaded Ukraine. He annexed territory for the first time since World War II in Europe, violating norms, laws and international agreements that Russia had signed up to for decades, so the G-7 rightly, as one of their many sanctions against Putin, decided to kick him out.”

McFaul said he did not see a reason to bring Putin to the gathering.

“What is the U.S. national security interest that is advanced?” he said.

But even if the leaders do not agree to formally readmit Russia, Putin could find his way to next year’s summit. The G-7 is an informal group with few set rules about its membership. Decisions are taken by consensus. The countries rotate hosting responsibilities, and the host nation any given year has wide-ranging power to invite additional guests and set the agenda.

Top Democrats, Senate Minority Leader Charles E. Schumer (N.Y.), and Sens. Jack Reed (R.I.), Robert Menendez (N.J.) and Mark R. Warner (Va.) sent a letter to Trump on Tuesday telling him that “under no circumstances” should he invite Putin.

“Readmitting Putin’s Russia to the G7 would be contrary to our values and a clear abdication of the United States’ responsibilities as the world’s leading democracy,” they wrote.

If Trump insists on bringing Putin next year, leaders may be faced to choose whether to protest — but as the American president, Trump may have the power to get his way.

When Canadian Prime Minister Justin Trudeau was asked Monday whether he would boycott a summit with Putin in attendance, he demurred, even though he had just blasted the idea.

“I have never shied away at global summits from tables around which Mr. Putin sat and contributed,” Trudeau said. “Given an opportunity, I will repeat myself and listen to what he has to say.”

Rucker reported from Washington.