WASHINGTON — The United States retaliated against Russia for its ouster of U.S. Embassy personnel in July by ordering it on Thursday to close its consulate in San Francisco and two other offices in Washington, D.C., and New York City.

The order will bring the United States and Russia into “parity” with three consulates each, and comes after the United States reduced the size of its mission in Russia, said State Department spokeswoman Heather Nauert in a statement.

Russia has until Sept. 2 to close the Consulate General in San Francisco, a chancery annex in Washington, D.C., and a consular annex in New York City, Nauert said.

Russia forced the United States to remove 755 from its diplomatic mission there in retaliation for the Senate approving sanctions in a 98-2 vote to prevent President Donald Trump from lifting penalties imposed by the Obama administration for Russian meddling in the 2016 U.S. election and aggression in Ukraine.

In her statement Thursday, Nauert called Russia’s response to that sanctions bill, which Trump signed, “unwarranted and detrimental to the overall relationship between our countries.”

advertisement | advertise on newsday

But she added a conciliatory note.

“While there will continue to be a disparity in the number of diplomatic and consular annexes, we have chosen to allow the Russian Government to maintain some of its annexes in an effort to arrest the downward spiral in our relationship,” Nauert said.

“The United States hopes that, having moved toward the Russian Federation’s desire for parity, we can avoid further retaliatory actions by both sides and move forward to achieve the stated goal of both of our presidents: improved relations between our two countries and increased cooperation on areas of mutual concern.”