A Brooklyn neighborhood that erupted in violence from racial strife a quarter century ago was filled with bouncy castles, music and smiles on Sunday.

The Crown Heights community marked the anniversary of the end of the 1991 riots with a block party at Brower Park.

Although there were some who questioned whether the lighthearted festivities were an appropriate way to mark one of the city’s darkest moments, the diverse residents who came to the event said the fete was a perfect symbol of how far the community has come.

“At one time, the world was looking at Crown Heights as a Mecca for riots and violence. Now they see unity and togetherness,” said Karl Cohen, a black community leader who has lived in the neighborhood for 54 years.

The event kicked off with a ceremony featuring elected officials, Jewish and Christian clergy, and Carmel Cato, the father of Gavin Cato.

Gavin, 7, who was black, was struck dead by a station wagon that was in a motorcade for a rabbi, inciting residents to take to the streets after rumors spread that a Jewish volunteer ambulance didn’t help the boy.

Two days of riots followed, resulting in hundreds of police officers and residents getting injured, and the fatal stabbing of Yankel Rosenbaum, 29, an Australian Jew who was studying in New York.

Rabbi Shlomo Segal, of the Kehilat Moshe congregation in Sheepshead Bay, recited a prayer during the ceremony, as Carmel Cato lit a candle. Segal said it took a lot of effort, but the black and Jewish communities were able to grow together harmoniously.

“It wasn’t easy, but I think this is the community that honors their commitment to peace,” he said.

Tiffany Murray, 40, a Crown Heights resident who works for the nonprofit group Save our Streets, said residents have been willing to see past their differences and acknowledge that, deep down, they’re all New Yorkers.

“There will always been challenges, but people communicate better,” she said.

Tova Bernbaum, 37, an attorney who came to the event with her children, agreed.

“I feel like it’s important that the community always remember and do what we can to move on and come together,” she said.