New York City lawmakers passed the nation’s most far-reaching measure Wednesday to protect out-of-work job applicants from discrimination, allowing job-seekers to sue if they believe they have been turned away because they’re unemployed.

City Council members overrode a mayoral veto of the measure, making the city the fourth place in the country with some form of legislation against discriminating against unemployed job-seekers. The new law takes effect in three months.

While the other measures ban help-wanted ads that say applicants must be employed, the New York City law goes further by letting rejected applicants take employers to court and get damages.

“We cannot and will not allow New Yorkers who are qualified and ready to work and looking to work to have the door of opportunity slammed in their faces,” City Council Speaker Christine Quinn said.

It felt like that to Joe Capone as he looked for work after a tough break more than three years ago: He left his information technology support job in late 2009 for a better-paying offer that then got rescinded.

At one point, he said, a recruiter told him to fudge his resume to say he’d been working because, otherwise, he’d never get a response. He didn’t follow the advice and eventually found a job in December 2011.

But it still bothers Capone that unemployment may be holding other job-seekers back.

“It’s something that’s totally out of their control, especially in certain fields,” said Capone, 46, who lives in the city.

Unemployment-discrimination laws have been floated around the country in recent years. President Barack Obama proposed one in 2011, and New Jersey, Oregon, and Washington, D.C., have passed them. New Jersey, which enacted the first such measure in 2011, has cited at least one company for an ad that excluded jobless applicants, its state Labor Department says.

Unemployed job-hunters and their advocates say it’s illogical and unfair to be required to have a job to get a job, particularly after years of high unemployment and layoffs. Nationally, more than 1 in 3 unemployed workers has been looking for at least six months, the federal Bureau of Labor Statistics says.

But businesses and Mayor Michael Bloomberg predict the unemployment-discrimination measure will lead to baseless lawsuits from disgruntled applicants. They say lawmakers shouldn’t try to dictate how hiring choices get made, and Bloomberg has suggested it may well be reasonable to take someone’s joblessness into account.

Unlike race, religion, gender and other characteristics targeted by anti-discrimination laws, “the circumstances surrounding a person’s unemployment status may, in certain situations, be relevant to employers when selecting qualified employees,” the billionaire mayor, who founded and ran a financial-information firm before going into politics, said in his veto message last month.

Bloomberg didn’t elaborate. But experts say hiring managers may think –however unfairly— that unemployed applicants aren’t top performers or that they’ll take an offer out of desperation and then leave if something better comes up.

If an applicant hasn’t been working for a couple of years, companies might worry that his or her skills are rusty, said Kathryn Wylde, president of the Partnership for New York City, an influential business group.

Industries are being so fundamentally changed by technology and globalization that “the longer the gap, the further (applicants) are from what’s happening on the cutting edge of their field,” she said.

An October 2011 search of New York City-based job listings found more than a dozen that explicitly required candidates to be employed, according to Manhattan Borough President Scott Stringer’s office. A broader review that year by the National Employment Law Project found 150 ads that were restricted to or aimed at people currently working.

Last fall, California Gov. Jerry Brown vetoed an unemployment-discrimination measure, indicating he wasn’t happy with changes made to it. At least 15 other states that have considered the idea haven’t acted on it.