OAKLAND (KPIX 5) – Oakland Mayor Libby Schaaf sent out a tweet warning people about pending immigration sweeps.

Days later, she still stands by her tweet. But her critics say it was reckless and may have been illegal.

“Everything that I’ve done has been legal,” Schaaf said.

Former federal prosecutor Tony Brass said putting out a public warning about a planned immigration sweep may have crossed the line.

“She’s on the threshold of obstruction of justice for doing what she did,” Brass said. “Because you put agents in danger. You put the police in danger and you put neighbors in danger.”

Schaaf disagrees. She said, “I was sharing information in a way that was legal and was not obstructing justice, and it was an opportunity to ensure that people were aware of their rights.”

Still, there could be repercussions.

“What’s going to happen is that federal agents are going to stop talking to local police agencies,” Brass said.” And the reason that communication is so vital is for safety. For safety of everybody.”

Schaaf’s warning on the pending ICE raids is also being slammed by critics of sanctuary cities.

Oakland’s sanctuary city laws are some of the toughest in the country.

Steven Camarota with the Center for Immigration Studies said, “This seems to be mostly a political stunt. It’s not going to stop ICE from enforcing the law.”

The mayor has local defenders like UC Hastings College of the Law immigration professor Richard Boswell, who says “She’s trying to keep some level of peace within the community.”

But questions still remain. For instance, will the mayor reveal who told her of the planned raids?

Schaaf said, “No…My information did not come through official channels.”

Camarota said, “Virtually everyone who’s likely to be caught up in one of these enforcement actions is someone who we call a criminal alien. That is someone who’s typically committed some other crime.”

Schaaf said she is concerned that this “has been used as a wedge issue and that this ugly myth that immigrants are criminals. This is a difficult decision I made, I recognize that it’s controversial, but I believe it was the right thing to do.”

She said that based on the information she had, she would do it again.

Some ICE officials have said city officials, like Schaaf, should be held liable for their actions.

But so far it’s just been talk.

ICE released a statement Monday saying that sanctuary cities like Oakland are “not immune from federal law” and that their refusal to cooperate by handing over immigration violators with criminal records, both increases the danger of something going wrong in a raid and increases the chances that people who ICE isn’t even looking for will get caught up in the raids as well.