A new law, dubbed the “How Many Stops Act,” passed 42-9 in a final New York City Council vote on Tuesday. It will require police officers to record the race, gender and ages of everyone police stop for questioning.

The issue gained national attention in recent days after a Black city council member was pulled over by police.

While NYPD officers have been required to document their use of “accusatory” questions when they investigate, detain, search or arrest someone, the new law will require them to also document basic information in low-level encounters where people are not necessarily suspected of a crime. Officers will also have to state the reason for the stop, and the data will be made available on the police department’s website.

The law is not intended to apply to non-investigative, informal conversations with civilians.

The new law marks changes in the largest police department in the U.S., one which has a history of racial discrimination, including the “stop-and-frisk” policy that was disproportionately used on members of the city’s Black and Latino communities. In 2013 a federal judge ruled that the NYPD violated the civil rights of Black and Hispanic residents with the tactic, according to PBS.

New York City Mayor Eric Adams, a former police captain, had vetoed the new law, saying its accountability measure would be too time-consuming for officers, PBS reported. Adams said officers would be busy completing paperwork instead of focusing on combating crime.

“In public safety, seconds matter,” Adams said Tuesday at City Hall as he appealed to the council to let his veto stand.

Adams had made attempts to rally supporters against the law by hosting police ride-alongs for council members.

New York City Public Advocate Jumaane Williams, who sponsored the bill, pushed back against Adams’ claim, saying the system for reporting encounters exists and was accessible through officers’ smartphones.

“This is not about preventing police work,” Williams said. “This is police work.”

While some council members in the Republican minority suggested the bill served only to further racial divisions, supporters of the law say the need for greater police transparency was made obvious after an officer pulled over Council Member Yusef Salaam on Friday without providing a reason for doing so.

Salaam is an exonerated member of the “Central Park Five,” a group of Black New Yorkers who were falsely accused and convicted of raping a white Central Park jogger in 1989. The police department later released a statement saying Salaam was pulled over for having window tint darker than the legal limit.

The council also overrode another Adams veto on a bill restricting the use of solitary confinement in the city’s jails. The bill places a four-hour limit on isolating inmates who pose an immediate risk of violence to others or themselves in “de-escalation” units.

Some information for this report came from the Associated Press.