"Now, it makes no difference to me whether she was off duty or on duty at the time. She serves this city," de Blasio said.
"She is an example of everything we would want from our fellow citizens - a commitment to others, a commitment to service, a willingness to do something greater than herself. And what does she get for it? Threats to her life and bigotry. Taunts. We can't allow this. It's unacceptable in this city, it's unacceptable in this nation."
Elsokary appeared at the news conference alongside de Blasio, who said that he wanted to ensure that those who read about the incident or saw it on televised broadcasts could put a real face to the story.
"Think of what we value in this city and this nation," he said. "We value people who put on a uniform and protect us. We value people who have a faith and live it out. And she has done all those things, and it's absolutely unacceptable that she or anyone would be treated with hatred or bigotry."
De Blasio also noted that the suspected assailant allegedly yelled "go back to your country" at Elsokary and her son during the attack.
"Well, this is Officer Elsokary's country," he said. "She is an American, she is a New Yorker. She's already at home. And we cannot allow this kind of hatred and bias to spread. We have to stop it every single time."
De Blasio also cited a 2014 incident in which Elsokary assisted during a blaze. That fire and Elsokary's heroics are detailed in a New York Daily News report, which states that she was on patrol with a sergeant when they heard a police call about a fire.
While the pair were working at the scene, Elsokary heard a baby cry, so she rushed up. She discovered a woman and a 1-year-old, whom she helped escape the two-storey building, the newspaper reported.
"I became a police officer to show the positive side of a New Yorker, a Muslim woman that can do the job, that is non-biased, that I help everybody no matter what's your religion, what's your faith, what do you in New York," Elsokary said at the news conference. "I'm born and raised here. And I'm here to protect you, and I know that my department and my city is here to protect me."
The New York chapter of the Council on American-Islamic Relations condemned the alleged attack in a Facebook post, in which CAIR-NY Executive Director Afaf Nasher called on President-elect Donald Trump to "forcefully and repeatedly address the ugly hatred growing rampant through-out our nation".
Since Trump's victory, a number of charged incidents have been reported across the country, including some that involve Muslims.
Last month, a Muslim teacher in Georgia said a note was left in her classroom telling her that her "headscarf isn't allowed anymore". The anonymous note instructed her to "tie" the scarf around her neck and "hang yourself with it".
And at the University of Michigan, a female student was approached by a man who threatened to set her on fire if she didn't take off her hijab, or head covering. The student complied, police said.
In a 60 Minutes interview that aired last month, Trump said he was "so saddened to hear" that people were harassing others in his name. "And I say, 'Stop it,'" the President-elect said. "If it - if it helps, I will say this, and I will say it right to the cameras: 'Stop it.'"