Police officers listen as New York Mayor Bill de Blasio and NYPD Commissioner Jim O’Neill conduct a news conference on Jan. 4. (Mary Altaffer/Associated Press)

Danielle Alamrani is an observant Muslim, a New York police officer and a realist. She knew when she decided to wear her hijab with her uniform, not everyone in the public would greet her with fist bumps and glad tidings.

But even she was surprised by the years of verbal and physical attacks by her fellow officers after she started wearing that very public display of her Islamic faith, her attorney said.

Officers have tried to rip her hijab off, called her a “Muslim b—-” and a “moving target,” her lawsuit says. During role call before one shift, a supervisor joked that Alamrani should try not to “detonate on patrol.”

Even worse, according to her lawsuit: Her employers turned a deaf ear when she reported the harassment.

“You do expect police officers to have thicker skin and be able to deal with other people,” said Alamrani’s attorney, Jesse C. Rose. “But you don’t expect them to have do that with their own colleagues.”

One of the lowest points of her ordeal, according to her lawsuit, came on Christmas Day 2012.

She was in the precinct headquarters when two fellow officers “physically attacked her and attempted to rip her Hijab off of her head,” her lawsuit says. “They were screaming that nobody liked (Alamrani),” and referred to her as “Muslim b—-” and said, “I will punch you in the face.”

One of the officers involved in the attack was the liaison for the Equal Employment Office — the person Alamrani is supposed to talk to if she experiences religious discrimination.

Alamrani is suing the city of New York, its police department and several of its officers, claiming years of discriminatory harassment and attacks.

The NYPD declined to comment for this article, directing calls to the City Law Office, which did not respond to messages.

Of NYPD’s 34,500 officers, about 1,500 are Muslim, according to the Muslim Officers Society. Alamrani is one of two women on the force who wear hijabs with their uniform.

She became an officer in 2006 and a Muslim a year later. But the vitriol increased in 2008 when she began wearing her headscarf at work. She was granted an official religious accommodation to wear a hijab on duty on May 13, 2009.

Some officers and supervisors warned her about her attire. It was a safety hazard, they said. She could be targeted. A sergeant “intimated that the ‘bosses’ were complaining about it and then told her that she should not wear the Hijab,” the lawsuit says.

Before she started donning the headscarf, she had regular patrol duties and a partner, Alamrani’s lawsuit says. Afterward, she was given desk duty, security posts and jobs guarding prisoners. The assignments had an effect on her paycheck “as a vast majority of overtime is earned due to arrests made on patrol.”

In 2012, she went through the department’s official channels to stop the harassment and receive equal treatment. Later that year, the attack happened, the lawsuit says.

And over the next few years, the harassment intensified. Her lawsuit claims an officer responding to a noise complaint at her home illegally detained her and her children for eight hours “just to harass her.”

The stress forced Alamrani into early retirement, but she came back in the summer of 2015 and “found that she was being discriminated against in a worse fashion.”

“The comments became much worse at this point due to international issues and other common misconceptions about Muslims,” the lawsuit says. Her colleagues called her “ISIS,” “terrorist,” “Taliban” and “Jihad.” “This daily abuse was more than any reasonable person would tolerate.”

It reached a boiling point on Nov. 19, 2015, according to the lawsuit. Alamrani was at the gun range, and an officer there took pictures of her and posted them on Facebook.

Many of her colleagues who saw the post “began deriding her and made comments such as ‘f—— disgrace. … Many comments included threats of violence,” the lawsuit alleges.

Her attorney said NYPD is expected to receive the lawsuit this week.

In December, New York Mayor Bill de Blasio and the NYPD threw their support behind a female Muslim officer after a man called her “ISIS” and threatened to slit her throat. ISIS is another name for the Islamic State.

The officer, Aml Elsokary, was not injured in the incident, which happened while she was off-duty and wearing her hijab. The man who made the threats was arrested on charges of aggravated harassment and menacing as a hate crime, The Washington Post’s Sarah Larimer reported.

“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 at a news conference following the incident. “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.”

Lt. Adeel Rana, the president of the Muslim Officers Society, said he feels rising anti-Islamic sentiment has made Muslim officers a target both inside and outside the department.

“It doesn’t help with the whole environment where everything is anti-Muslim, anti-Islam,” he told The Post. “Bottom line is people that serve in the NYPD are humans also. They have their own biases.”

He encouraged MOS members to have an open dialogue with non-Muslims and to keep an open mind.

“Of course, you can’t change people’s mind-sets,” he said. “Anytime you start something outside the normal culture, there is going to be resistance. We encourage all our members to follow how strongly they believe in their faith.”

Read more: 

A black police officer complained about racism. He says his department retaliated by firing him.

Yesterday’s Ku Klux Klan members are today’s police officers, councilwoman says

‘Learn your manners,’ a white man wrote to his black neighbor. This was the response.

A white officer said she was shot by a black man. Then her story started to unravel.