The Trump administration is moving toward handing back to Russia two diplomatic compounds, near New York City and on Maryland’s Eastern Shore, that its officials were ejected from in late December as punishment for Moscow’s interference in the 2016 presidential election.

President Barack Obama said Dec. 29 that the compounds were being “used by Russian personnel for intelligence-related purposes” and gave Russia 24 hours to vacate them. Separately, Obama expelled from the United States what he said were 35 Russian “intelligence operatives.”

[The luxurious, 45-acre compound in Maryland being shut down for alleged Russian espionage]

In early May, the Trump administration told the Russians that it would consider turning the properties back over to them if Moscow would lift its freeze, imposed in 2014 in retaliation for U.S. sanctions related to Ukraine, on construction of a new U.S. consulate on a certain parcel of land in St. Petersburg.

Two days later, the U.S. position changed. Secretary of State Rex Tillerson told Russian Foreign Minister Sergei Lavrov and Russian Ambassador Sergey Kislyak at a meeting in Washington that the United States had dropped any linkage between the compounds and the consulate, according to several people with knowledge of the exchanges.

1 of 21 Full Screen Autoplay Close Skip Ad × Russian compounds in Maryland and New York shut down View Photos Two luxury retreats, in Centreville, Md., and Oyster Bay, N.Y., where Russian diplomats have gone for decades to play tennis, sail and swim, were shut down by the Obama administration in retaliation for Moscow’s alleged hacking in the presidential election. Caption Two luxury retreats, in Centreville, Md., and Oyster Bay, N.Y., where Russian diplomats have gone for decades to play tennis, sail and swim, were shut down by the Obama administration in retaliation for Moscow’s alleged hacking in the presidential election. Dec. 30, 2106 The Russian Embassy’s compound near Centreville, Md. NBC4/WRC-TV via Reuters Buy Photo Wait 1 second to continue.

[Inside the Oval Office with Trump and the Russians: Broad smiles and loose lips]

In Moscow on Wednesday, Kremlin aide Yury Ushakov said Russia was “taking into account the difficult internal political situation for the current administration” but retained the option to reciprocate for what he called the “expropriation” of Russian property “if these steps are not somehow adjusted by the U.S. side,” the news outlet Sputnik reported.

Senior Tillerson adviser R.C. Hammond said that “the U.S. and Russia have reached no agreements.” He said the next senior- level meeting between the two governments, below the secretary of state level, will be in June in St. Petersburg.

Before making a final decision on allowing the Russians to reoccupy the compounds, the administration is examining possible restrictions on Russian activities there, including removing the diplomatic immunity the properties previously enjoyed. Without immunity, the facilities would be treated as any other buildings in the United States and would not be barred to entry by U.S. law enforcement, according to people who spoke on the condition of anonymity to discuss sensitive diplomatic matters.

Any concessions to Moscow could prove controversial while administration and former Trump campaign officials are under congressional and special counsel investigation for alleged ties to Russia.

[Comey may testify before Senate as early as next week on Trump interactions]

Changes in the administration’s official posture toward the compounds come as Russian media recently suggested that Kislyak, about to leave Washington after serving as ambassador since 2008, may be proposed by the Kremlin to head a new position as U.N. undersecretary general for counterterrorism.

(WUSA 9)

Kislyak, who met and spoke during the campaign and transition with President Trump’s former national security adviser, Michael Flynn; Trump’s White House adviser and son-in-law, Jared Kushner; Attorney General Jeff Sessions; and others, is known to be interested in the post. His replacement as ambassador, Deputy Foreign Minister Anatoly Antonov, was confirmed last month by the Russian Duma, or parliament. Officials in Moscow said Russian President Vladi­mir Putin will officially inform Trump of the new ambassador when the two meet in July, at the Group of 20 summit in Hamburg. It will be Trump’s first meeting with Putin as president.

The U.N. General Assembly must first approve establishment of the counterterrorism slot, part of a larger U.N. reorganization and the first new post at that level for decades.

Russia will almost certainly claim the slot as the only member of the five permanent members of the Security Council without one of its nationals in a senior U.N. position. Jeffrey Feltman, a former senior U.S. diplomat, is undersecretary-general for political affairs; comparable jobs for peacekeeping, humanitarian affairs and economic affairs are held, respectively, by nationals from France, Britain and China.

Secretary General António Guterres will decide who fills the new job, although both Russia and the United States are expected to make their views known.

Kislyak has repeatedly rejected descriptions of him in the U.S. media as a spy. Asked whether U.S. intelligence considered him to be one, James R. Clapper Jr., the former director of national intelligence, told CNN on Sunday that “given the fact that he oversees a very aggressive intelligence operation in this country — the Russians have more intelligence operatives than any other nation that is represented in this country, still even after we got rid of 35 of them — and so to suggest that he is somehow separate or oblivious to that is a bit much.”

[Russian ambassador told Moscow that Kushner wanted secret communications channel with Kremlin]

The Russian compounds — a 14-acre estate on Long Island and several buildings on secluded acreage along the Corsica River on Maryland’s Eastern Shore — have been in Russian possession since the days of the Soviet Union. According to a Maryland deed in 1995, the former USSR transferred ownership of the Maryland property to the Russian Federation in 1995 for a payment of one dollar.

Russia said it used the facilities, both of which had diplomatic immunity, for rest and recreation for embassy and U.N. employees and to hold official events. But U.S. officials dating to the Reagan administration, based on aerial and other surveillance, had long believed they were also being used for intelligence purposes.

Last year, when Russian security services began harassing U.S. officials in Moscow — including slashed tires, home break-ins, and, at one point, tackling and throwing to the ground a U.S. embassy official entering through the front of the embassy — the Obama administration threatened to close the compounds, former Obama officials said.

In meetings to protest the treatment, the Obama administration said that it would do so unless the harassment stopped, and Moscow dropped its freeze on construction of a new consulate to replace the one in St. Petersburg, considered largely unusable because of Russian spying equipment installed there. Russia had earlier blocked U.S. use of a parcel of land and construction guarantees in the city when sanctions were imposed after its military intervention in Ukraine and annexation of Crimea.

The threat of closing the compounds was not pursued. In late December, after U.S. intelligence said there had been election meddling, and in response to the ongoing harassment in Moscow, Obama ordered the compounds closed and diplomats expelled. “We had no intention of ever giving them back,” a former senior Obama official said of the compounds.

Trump, then at his Mar-a-Lago estate in Florida, appeared to disparage the Obama administration sanctions, telling reporters, “I think we ought to get on with our lives.”

Surprisingly, Russia did not respond. It later emerged that Flynn, in a phone conversation with Kislyak, had advised against retaliation and indicated that U.S. policy would change under the Trump administration.

[Putin says he won’t deport U.S. diplomats]

The Kremlin made clear that the compound issue was at the top of its bilateral agenda. Russia repeatedly denounced what it called the “seizure” of the properties as an illegal violation of diplomatic treaties.

On May 8, the U.S. undersecretary of state for political affairs, Thomas Shannon, traveled to New York to meet with his Russian counterpart, Deputy Foreign Minister Sergei Ryabkov on what the State Department described as “a range of bilateral issues” and what Russia called “irritants” and “grievances.”

Ryabkov brought up the compounds, while Shannon raised St. Petersburg and harassment, suggesting that they deal with the operation of their diplomats and facilities in each others’ countries separate from policy issues such as Syria and proposing that they clear the decks with a compromise.

Russia refused, saying that the compound issue was a hostile act that deserved no reciprocal action to resolve and had to be dealt with before other diplomatic problems could be addressed. In an interview with Tass, Ryabkov said Moscow was alarmed that Washington “carries on working out certain issues in its traditional manner, particularly concerning Russia’s diplomatic property in the states of Maryland and New York.”

Two days later in Washington, Tillerson told Lavrov that the United States would no longer link the compounds to the issue of St. Petersburg.

Immediately after their May 10 meeting at the State Department, Tillerson escorted Lavrov and Kislyak to the Oval Office. There, they held a private meeting with Trump. The night before, the president had fired FBI Director James B. Comey, who was then heading an FBI investigation of the Russia ties.

Comey, Trump told the Russians, was a “real nut job,” and his removal had “taken off” the ­Russia-related pressure the president was under, the New York Times reported. Later in May, the Justice Department appointed former FBI director Robert S. Mueller III as special counsel to oversee the federal investigation.

In a news conference at the Russian Embassy after his meetings with Tillerson and Trump, Lavrov said of the compound closures, “Everyone, in particular the Trump administration, is aware that those actions were illegal.”

“The dialogue between Russia and the U.S. is now free from the ideology that characterized it under the Barack Obama administration,” he said.

Julie Tate contributed to this report.

Read more:

On the Eastern Shore, a 45-acre Russian compound kept its secrets close

Political chaos in Washington is a return on investment for Moscow

White House offers shifting explanations of Trump’s disclosures to Russians