Former New York City Mayor Michael Bloomberg has yet to formally announce whether he will run for president in 2020, but during remarks where he looked to the future before a majority-black church in Brooklyn, he apologized for his controversial “stop and frisk” policy that sowed distrust of police in black and Latino communities during his administration.

That policy, which was later repealed, allowed police to stop individuals on the street and briefly question and frisk them if they had reasonable suspicion that the person may be committing, had committed or is about to commit a crime. During his Sunday speech, Bloomberg recognized that this led to “far too many innocent people” being stopped, many of them black or Latino.

“Over time I’ve come to understand something that I’ve long struggled to admit to myself,” Bloomberg told congregants at the Christian Cultural Center in the East New York neighborhood of Brooklyn. “I got something important wrong. I got something important really wrong.”

“I got something important wrong. I got something important really wrong.” — Michael Bloomberg, former mayor of New York City

DEMOCRATS ATTACK BLOOMBERG OVER 'STOP AND FRISK'

Bloomberg, who has filed paperwork to enter the presidential primaries in Alabama and Arkansas, said that as he looked to the future, he also reflected on instances in the past where he “came up short.” He said that he had worked hard to build trust between communities and police, but that the stop-and-frisk policy eventually resulted in resentment when too many innocent people were being stopped.

“The erosion of that trust bothered me,” Bloomberg said. “And I want to earn it back.”

The former three-term mayor defended his intentions, which were to reduce gun violence, but admitted that he made an error in how he went about it, even noting that when he put in safeguards to reduce police stops, crime did not go up.

BLOOMBERG WON'T CAMPAIGN IN EARLY VOTING STATES IF HE RUNS FOR PRESIDENT, AIDE SAYS

“Today, I want you to know that I realize that back then I was wrong,” he said. “And I’m sorry.”

The city's top police union hit back Sunday. “Mayor Bloomberg could have saved himself this apology if he had just listened to the police officers on the street. We said in the early 2000s that the quota-driven emphasis on street stops was polluting the relationship between cops and our communities. His administration’s misguided policy inspired an anti-police movement that has made cops the target of hatred and violence, and stripped away many of the tools we had used to keep New Yorkers safe. The apology is too little, too late,” Police Benevolent Association President Patrick J. Lynch said.

"Mayor Bloomberg could have saved himself this apology if he had just listened to the police officers on the street." — Patrick J. Lynch, president, New York City PBA

CLICK HERE FOR THE FOX NEWS APP

Despite repeated references to the future and promises to keep fighting gun violence, Bloomberg would not make any declaration on what his next steps will be.

“I don’t know what the future holds for me,” he said, but promised that he will continue to working to stop gun violence, “and creating a more equal and just society for everyone.”

Fox News' Tamara Gitt contributed to this report.