Three years ago, Chicago spent nearly $2 million — and $1.7 million more in legal fees — to compensate dozens of women denied firefighter jobs because of a discriminatory test of upper body strength that City Hall has now scrapped.

Now, a dozen women who wanted desperately to become paramedics are accusing the Chicago Fire Department of devising two new physical agility tests that are equally biased against women.

One test requires candidates to go up six flights of stairs with a 250-pound dummy within eight minutes. The other requires candidates to step onto and off of an 18-inch-high box to the beat of a metronome for two minutes without missing a beat while holding 25-pound weights in each hand.

The lawsuit filed Friday in federal court alleges that the two tests were “invented to eliminate women” in a Chicago Fire Department where “discrimination against women is stubborn and purposeful.”

The women are seeking back pay and other measures to compensate for the discrimination they have suffered.

Shannon Markey said no amount of compensation could make her whole for the dream shattered by the city’s decision to fire her on the day before she was scheduled to graduate from the fire academy.

“Financially, it has ruined me. I had to move into the city. I took an $80,000 loss on my house only to come out with no job,” Markey, 42, said Monday.

“This was my dream job. It’s all I wanted for a long time and it’s been crushed. I’m a 911 contract paramedic doing the same type of calls and job-required lifting. The requirement of what a paramedic does I’m able to meet. And they say I can’t do that for them? They crushed my world.”

Markey said she has little doubt that, because she’s a woman, she was targeted by a particularly abusive male instructor.

“He constantly rode, belittled and talked down to me all day long. In front of the whole class, he told me I should get my money back from my personal trainer,” Markey said.

“You shouldn’t belittle anybody. That’s not your job. You don’t do that. But he abused his power. I felt discriminated against. He made it emotionally on top of being physically abusive.”

Jamie Snevely, 33, said she uprooted her family from the suburbs to abide by Chicago’s residency rule, only to be terminated on the day in September 2014 that she was scheduled to graduate from the fire academy.

The termination was subsequently rescinded and Snevely and four other women were given six additional weeks to train and re-test.

But, Snevely said she was stopped during the re-test and told she was done.

“It was awful. We had to move back to the suburbs. We had to evict people out of our home and take them to court because they didn’t want to get out of our home,” Snevely said.

“My daughter was born early. She spent 66 days in the neo-natal intensive care unit. The doctors said it could have been because I pushed myself too hard through the academy. I had given up breast feeding my son [who was five month old] before the academy because I didn’t think they’d let me pump. I thought it would put a target on my back — and I believe it did.”

She added, “It was women they did not want for the most part. Five out of the seven of us women in Alpha class got fired and the other two were cheated through. I watched instructors carry the chairs for them. I literally watched one of the instructors stop his stopwatch and give it to her. She had relatives and connections into the Fire Department.”

Attorney Marni Willenson, who filed the lawsuit, questioned why the city “concocted” additional tests to administer during fire academy training that “fail only women” after all of the plaintiffs passed the pre-hiring test.

“It’s another barrier to the employment of women in fire service. And arguably it’s even more egregious because these women are already in. You’ve got to question why are they doing this. Under these circumstances, you must question the intent,” Willenson said.

Willenson noted that two of the dozen plaintiffs heard Fire Commissioner Jose Santiago say that the stair test was “not realistic.”

Fire Department spokesman Larry Langford could not be reached.

City Law Department spokesman Bill McCaffrey said: “We cannot comment on the pending litigation, however, the Fire Department does not condone discrimination of any kind, and no longer uses the physical abilities tests that are included in this suit.”

Willenson said; “If the test is not realistic and the commissioner knows it’s not realistic, why are they using it to flunk women?”

Noting that the paramedic work force has remained 70 percent male for two decades, Willenson said: “Everything adds up to intentional discrimination or, at best, a reckless indifference to equal employment of women. They’ve been sued again and again and again.”

In late September, a federal appeals court ruled in favor of female paramedics in striking down a physical performance test used by the city to hire paramedics for over a decade.

The decision in the sex discrimination lawsuit, Ernst v. City of Chicago, overturned federal district court verdicts in 2014 and 2015 finding the city’s use of the test did not discriminate against female applicants.

“The physical entrance exam … risks cementing unfairness into Chicago’s job-application process,” the Seventh Circuit Court of Appeals said in siding with the paramedics.

The Fire Department has been mired in litigation over racially and sexually discriminatory hiring practices for decades.