The State Department on Thursday warned that Russian government security officials in both Ukraine and Russia "may be singling out U.S. citizens" based on their nationality, and urged Americans who remain in either country to "depart immediately."

The warning from the agency came during a press briefing with State Department spokesman Ned Price.

US State Department spokesman Ned Price speaks during a news conference at the State Department, March 10, 2022, in Washington, DC.

US State Department spokesman Ned Price speaks during a news conference at the State Department, March 10, 2022, in Washington, DC. (MANUEL BALCE CENETA/POOL/AFP via Getty Images)

"We take seriously our responsibility to inform U.S. citizens about developments that may impact their safety and security when they are traveling or residing outside of the United States," Price said. "In recent weeks, as you've heard, we have seen reports that Russian security officials have singled out and detained U.S. citizens in Ukraine and in Russia itself."

"We have also heard President Putin denigrate equality, free speech, and human rights for all," Price continued. "For these reasons, we are warning U.S. citizens that Russian government security officials in both Russia and in Ukraine may be singling out U.S. citizens based on their nationality."

Vladimir Putin

Russian President Vladimir Putin (Yuri Kochetkov/Pool)

Price said updated travel advisories from the department now "reflect that information."

"We reiterate that all U.S. citizens in Russia and Ukraine should depart immediately," he said.

Earlier this week, the State Department updated its travel advisory for Russia, warning about "the potential for harassment against U.S. citizens by Russian government security officials" and "the singling out of U.S. citizens in Russia by Russian government security officials including for detention."

Similar changes were also added to the department's travel advisory for Ukraine.

russia ukraine war

Volunteers and security forces establish check points due to Russian attacks on Ukraine in Kyiv, Ukraine on March 18, 2022. (Photo by Emin Sansar/Anadolu Agency via Getty Images)

The warning from the department comes after Russia's detainment of WNBA player Brittney Griner, who was arrested in February at a Moscow airport for allegedly possessing vape cartridges containing oils derived from cannabis. The Phoenix Mercury star was detained and has been held ever since, while first reports of her arrest didn’t come to light until earlier this month – days after Russia began its invasion of Ukraine.

CLICK HERE TO GET THE FOX NEWS APP

Last week, Price said an official from the U.S. Embassy was able to see Griner recently, and she was said to be "in good condition." The Russian government allowed the U.S. to give consular access to Griner weeks after her arrest was reported.

Fox News' Ryan Gaydos contributed to this article.