Two of the NYPD’s former top chiefs have slapped the city with federal lawsuits, claiming they were ousted because they’re older, female — and white.

The plaintiffs — Joanne Jaffe, the department’s first female three-star Housing Bureau chief, and Diana Pizzuti, its first female chief of personnel — say they were unceremoniously booted in January 2018.

They say they were then replaced with a less experienced Hispanic woman and a white Irish man, respectively, allowing a trickle-down effect to create even more room for minorities and men.

“We don’t have a spot for you,’’ First Deputy Commissioner Benjamin Tucker snipped to Pizzuti when she tried to object to being forced out, her suit says.

Pizzuti, a 61-year-old of “Italian and Polish descent,’’ had 36 years with the department at the time, including previously as patrol borough commander of Queens North for nearly a decade, her suit says.

Meanwhile, Jaffe, a 60-year-old “Jewish-American,’’ had 38 years under her belt with the NYPD, including serving as commander of three precincts, the documents say.

John Moscow, a lawyer representing the women, told The Post that his clients were tossed aside as part of a push by Mayor Bill de Blasio and Police Commissioner James O’Neill to make the NYPD “younger and more diverse.”

According to the women’s filings in Manhattan federal court Monday, “If the mayor, or the police commissioner who reports to him, wants to promote younger people who are not white and who are women or are other than heterosexual males they can achieve these goals by creating vacancies in the ranks of chief, and promoting or transferring their favorite candidates.

“In this case when the police commissioner wanted to make promotions based on age, sex, ethnic background and race, he fired four chiefs who were all older and white.”

This past January, the women filed discrimination complaints against the department, but they got specific on their race claim in their suits.

The city, O’Neill and Tucker are named in the suits. The city Law Department did not respond to a request for comment, but an NYPD spokeswoman said in an e-mailed statement:

“These claims are baseless. The Police Commissioner set clear standards for every executive in a leadership position at the NYPD – be part of the team; embrace and support neighborhood policing; and treat people that you work with each and every day with respect. The people on the senior staff today display these qualities, and the Commissioner applauds these executives for their leadership.”

The plaintiffs are seeking a jury trial, as well as punitive and other damages.

They both said they wanted to work till age 63 and missed out on salary and benefits by being forced out.

Jaffe suggested in the papers that she got the heave-ho because she challenged the department’s sexism while still on the force.

She griped to superiors that female investigators were relegated to “menial tasks’’ during high-profile cases such as the Manhattan bike-path bombing in October 2017 and the Port Authority Bus Terminal attack that December, according to court papers.

It didn’t help that, during a meeting with O’Neill and other higher-ups, she also suggested the department “adopt gender neutral language’’ and do away with terms such as “ ‘he, as in ‘he the Sergeant,’ ” in huddles and training, the papers say.

Both women also lamented that instead of getting a traditional touching “walk-out’’ — in which cops clap and salute outgoing officers — they were “thrown out.’’