New York City Mayor Bill de Blasio received a mixed reaction from the crowd when he addressed hundreds of new police recruits at a police graduation ceremony at Madison Square Garden on Monday.

Although most of the audience applauded for the embattled mayor, some members of the New York Police Department could be heard booing and heckling de Blasio. At one point, over a dozen officers stood up and turned their backs against the mayor, striking the same pose of disrespect that hundreds of officers displayed during Officer Rafael Ramos' funeral on Saturday.

"It takes a special kind of person to put their lives on the line for others, to stare down the danger, because that's what you will do. You will stare down the danger. You will keep the peace," he told the 884 new police officers in the crowd, according to CBS New York.

"You'll confront all the problems that plague our society - problems that you didn't create," he added.

That's when someone in the crowd yelled, "You did!" which was followed by laughter and some applause, reports the Associated Press.

Nevertheless, de Blasio continued to salute the new officers and their commitment to protect the city. He also paused to remember the two NYPD officers slain by a gunman in Brooklyn earlier this month as they sat in their patrol car.

"We lost two peacemakers ... we lost two heroes," the mayor said. "They stood up for all that was good and right. They gave us hope by their presence among us, and they will not be forgotten. They must not be forgotten."

He received polite applause at the end of his speech.

Tension between de Blasio and the police unions has escalated in recent weeks after union leaders took offense when the mayor stated that he forewarn his biracial son to take caution when interacting with police officers in wake of the death of Eric Garner, an unarmed Black man who was allegedly choked to death by a white cop. Union reps also claim that the mayor has allowed anti-police protests, which has fostered anti-NYPD sentiment and led to the unprovoked murders of the two officers on Dec. 13.

According to NBC 4 New York, both De Blasio and Police Commissioner Bill Bratton are scheduled to meet with all five police unions on Tuesday.