Timeline of the US and Russia trading diplomatic blows A look at the diplomatic back and forth between the U.S. and Russia.

 -- The U.S. ordered Russia to close its consulate in San Francisco, as well as two diplomatic annexes in Washington, D.C., and New York, Thursday, responding to a Kremlin demand that hundreds of American diplomatic staff in Russia be cut.

The consulate closure was the latest turn in a cycle of diplomatic retaliation between Washington and Moscow over recent months that began with accusations of Russian interference in the U.S. 2016 election and that has seen President Donald Trump -- who as a candidate pledged improved relations with Russia-- instead drawn down a path of mounting tensions.

Below is a timeline tracking the key events in the diplomatic back and forth between the two countries:

Oct. 7, 2016 — The U.S. formally accuses Russia of running an espionage operation intended to influence the U.S. presidential election in a statement from the Office of the Director of National Intelligence and the Department of Homeland Security.

Dec. 29, 2016 — The Obama administration expels 35 Russian diplomats and seizes two compounds belonging to the Russian embassy in New York State and Maryland in retaliation for Moscow’s alleged meddling in the 2016 election. U.S. officials accuse Russia of using the two compounds for espionage and calls the expelled diplomats intelligence operatives.

Dec. 30, 2016 — President Vladimir Putin says Russia won’t retaliate against the expulsions for now and will wait to see U.S. policy under the Trump administration. Instead, Putin invites the children of U.S. embassy staff in Moscow to a New Year’s party at the Kremlin. Trump, then president-elect, on Twitter says Putin's decision to wait is a “great move,” adding that he "always knew he was very smart."

July 27, 2017 — The Senate passes a congressional bill approving sweeping new sanctions against Russia over its election meddling. The bill passes with overwhelming bipartisan support, setting up a challenge to Trump, who has said he opposes it.

July 31 — Putin orders the U.S. to cut 755 staff from its diplomatic presence in Russia by Sept. 1, citing the new sanctions bill and the Obama-era expulsions. Russia also closes a summer house and some storage warehouses belonging to the American embassy in Moscow.

Aug. 2 — Trump signs the sanctions bill into law while calling it "deeply flawed."

Aug. 31 — The U.S. orders Russia to close its consulate in San Francisco and two diplomatic annexes in Washington and New York by Sept. 2, saying it is retaliating over the staff cuts.

Sept. 1 — Russia's Foreign Minister Sergey Lavrov warns Russia may respond "toughly" to its consulate's closure, but offers an olive branch to Trump, saying the Kremlin is still eager to pursue his pre-election pledges to improve relations.