WASHINGTON (Reuters) - U.S. President Donald Trump criticized the Oakland, California, mayor on Thursday for alerting her community to a pending immigration raid, saying her actions prompted federal scrutiny.

FILE PHOTO - Oakland Mayor Libby Schaaf leaves after a press briefing at the scene of a fatal warehouse fire in the Fruitvale district of Oakland, California, U.S. December 6, 2016. REUTERS/Stephen Lam

“What the mayor of Oakland did the other day was a disgrace,” Trump told reporters before a Cabinet meeting at the White House.

“Where they had close to 1,000 people ready to be gotten, ready to be taken off the streets,” he said. “And the mayor of Oakland went out and she warned them all: ‘Scatter.’”

Oakland Mayor Libby Schaaf on Feb. 25 made a televised statement telling residents she had heard from multiple sources of a pending Immigration and Customs Enforcement action in the San Francisco Bay area.

“My priority is to keep this community safe. It is not my wish to panic people but to ensure that they’re prepared with information. That they know their rights as well as their responsibilities and know about the resources that this community offers,” she said.

“Residents should know that they do not have an obligation to open their doors if an ICE official knocks.”

The comments drew a storm of criticism from Trump administration officials including Attorney General Jeff Sessions and the acting ICE director, Thomas Honan. White House spokeswoman Sarah Sanders said a week ago that the Justice Department was reviewing Schaaf’s actions.

Trump weighed in on Thursday, accusing Schaaf of warning criminals away and endangering enforcement officers. He said it was “certainly something that we’re looking at with respect to her individually.”

“We’re looking at that situation very carefully,” he said.

The Republican president’s comments followed a Justice Department lawsuit on Tuesday against the state of California over so-called “sanctuary” policies that try to protect illegal immigrants against deportation.

Justin Berton, a spokesman for the mayor, said Schaaf was among a large number of elected California officials who believe sanctuary cities are legal.

“Her intention was for our residents to become familiar with their constitutional rights and legal obligations, and that is a perfectly legal message to share,” he said.

In her announcement, Schaaf said she did not learn of the raid in any official capacity and said it was her “ethical obligation” to share the information.

ICE arrested more than 200 people in a four-day sweep last month in the San Francisco area. Honan told Fox News after the raids that 800 others remained at large because of Schaaf’s action.