Acting Mayor Kim Janey said Thursday she regrets her Tuesday comment that compared governments mandating proof of vaccination at indoor sites to identification mandates of slavery, the Jim Crow era and discrimination against immigrants.

“I wish I had not used those analogies, because the[y] took away from the important issue of ensuring that our vaccination and public health policies are implemented with fairness and equity,” Janey said at a Thursday press conference.

But Janey said she would still oppose mandating “vaccine passports” for people in public places because it would result in “shutting out” many people from lower-income neighborhoods that have lower vaccination rates.

Janey's original comparison attracted backlash from City Councilor Andrea Campbell, a competitor in the race for mayor. On Wednesday, she called the comments “absolutely ridiculous,” adding: “The acting mayor’s comments yesterday put people’s health at risk, plain and simple.”

Janey made the comparison when a reporter asked for her thoughts on the new New York City mandate that requires vaccination for several indoor activites, such as gyms, restaurants and performance spaces.

“There’s a long history in this country of people needing to show their papers,” Janey said Tuesday. “During slavery, post-slavery, as recent as you know what immigrant population has to go through here. We heard Trump with the birth certificate nonsense. Here we want to make sure that we are not doing anything that would further create a barrier for residents of Boston or disproportionally impact BIPOC [Black, Indigenous and people of color] communities.”