A registered nurse came close to losing her $1,550-a-month apartment on the Upper East Side after being let go from two jobs in three months. A woman found herself dipping into a 401(k) to keep her $3,375 unit in Peter Cooper Village after her husband was laid off in February from his six-figure marketing job. A father of two with an M.B.A. and a law degree owed $5,400 in back rent in Stuyvesant Town after he struggled to find steady work and lent money to his wife’s family.

Lawyers, judges and tenant advocates say the staggering economy has sent an increasing number of middle-class renters across New York City to the brink of eviction, straining the legal and financial services of city agencies and charities. Suddenly, residents of middle-class havens like Rego Park in Queens and Riverdale in the Bronx are crowding into the city’s already burdened housing courts, long known as poor people’s court.

Even some affluent people in high-end places are finding themselves facing off with landlords. One man, laid off by Merrill Lynch, was forced to move out of his $5,700 apartment in TriBeCa, owing $20,000 in back rent. Todd Nahins, a lawyer who represents owners of luxury residential buildings, has been busy negotiating payment plans for tenants in arrears.

“There’s definitely an uptick of people who were basically very good rent payers until the economic downturn,” Mr. Nahins said. “There’s so many of them. People who at one point had made money are now not earning enough to pay their rent.”