President Donald Trump has publicly praised President Vladimir Putin, and slammed a Congress-led deal to punish Russia with more sanctions. He even agreed, at a meeting with Putin this summer, to a U.S.-Russia dialogue on cyber issues, even though four U.S. intelligence agencies assessed that Russian military intelligence hacked leading Democrats and probed state voting systems.

Yet in spite of the president, the U.S. government has appeared to take a tough line on Russia.

The latest example came when the State Department announced it was closing three Russian diplomatic facilities in New York City, San Francisco and Washington, in response to the Kremlin's dramatic decision last month to expel hundreds of American diplomatic workers.

But the internal debate over U.S. foreign policy toward Russia is a bit more complicated than that.

U.S. officials tell me that Undersecretary of State Tom Shannon, a career foreign service official appointed during the Obama administration, made a last-minute effort to stop the Russians from retaliating against the new sanctions, a response to Russia's election meddling that Trump reluctantly signed.

At the end of July, Shannon presented a "non-paper," a proposal with no official diplomatic markings, to his Russian counterpart that offered the return of two diplomatic compounds President Barack Obama shuttered in December.

The timing is important. Shortly after the offer, Russia announced the expulsion, which was widely seen as a major deterioration of already frosty relations between Washington and Moscow. It's also important because Obama's closing of the compounds at the end of his presidency has dogged Trump since he took office. His first national security adviser, Michael Flynn, was fired in part because details of his monitored phone calls with Russia's ambassador were leaked to the press that alleged Flynn was open to reversing Obama's sanctions.

The calls took place on the day of Obama's announcement.
The State Department's negotiations with Russia about returning the compounds began soon after Trump took office in February. As the Washington Post reported in May, the talks were aimed at de-escalating tensions with Moscow in the aftermath of the election.

At first, the return of the compounds was tied to allowing the U.S. to expand its consulate in St. Petersburg.

Normally something like this would go through an inter-agency process where the rest of the government would weigh in on the proposal and the president would make a decision. But Shannon's last-minute offer in July was tightly held.

A senior State Department official told me that Secretary of State Rex Tillerson had made Trump aware of the diplomacy.
Almost no one else in the government knew about Shannon's efforts. Two U.S. officials who work closely on Russia told me that the FBI's spy hunters in particular were furious when they found out Shannon had made the unofficial offer to return the compounds closed in December.

Fiona Hill, the National Security Council's senior director for European and Russian affairs, was also unaware of the offer, according to these officials.

Shannon's non-paper was not a total giveaway. It included tougher terms for how the Russians could use their compounds, specifying they could only be used for recreational activities. It also explicitly gave U.S. authorities the right to enter the compounds if there was suspicion of criminal activity or espionage.
That apparently was too much for Moscow. They went ahead with the diplomatic expulsions anyway. This time when the Trump administration considered its response, it went through a more rigorous inter-agency process, according to U.S. officials who participated in it. The FBI in particular pressed for closing the consulate in San Francisco because it was a center for Russian espionage activities on the West Coast.

The episode remains telling for both governments. The early days of disorganization in the Trump administration are coming to an end, ushering in a more deliberate policy on Russia as a consequence.

The goals of Russia, whose leaders often call for easing tensions, came into focus, too. Despite an offer to return the compounds, the Russians chose escalation over accommodation. The Trump administration, in the end, chose retaliation.

Eli Lake is a Bloomberg View columnist who writes about politics and foreign affairs. He was previously the senior national security correspondent for the Daily Beast. Lake also covered national security and intelligence for the Washington Times, the New York Sun and UPI, and was a contributing editor at the New Republic.