Terrell Walker lives in a one-bedroom apartment in Southeast Washington, D.C., with her 9-year-old and 2-year-old daughters.

Walker stopped paying her rent last September because, she says, her apartment is in horrible condition — and she is fighting her landlord's eviction threat in court.

But when tenants don't pay, landlords say they have less money to fix things up.

It is a vicious cycle that can often land the parties in court, and it's a scene that has become common around the country. The lack of affordable housing is forcing low-income renters to choose between apartments they can't afford or those that aren't in the best shape.

A Frustrating Legal Process

When Walker is at her job as a coach for disabled workers, her mother, Patsy Yates, watches the girls. Yates shows me the conditions of her daughter's apartment one day when she is looking after the children.

"If you sit right here by this window, like you're sitting watching TV, the wind is coming in the window so bad that you can feel it," Yates says. "The bathroom is extra cold. The bedroom back there is extra cold. So I usually try to boil some water or something to try to keep it warm in here."

But she says that's dangerous with a little child running around.

"And you don't never know when she's going to hit that stove," Yates says.

The apartment is crowded for three people. In the living room, there's a bed with a bright pink comforter. The building is more than 50 years old. The baseboard heaters are falling away from the wall, although they're warm to the touch.

Then, Yates has me feel around the window frames.

"You see, you feel the wind. It doesn't stay warm in here," she says.

There is a breeze, at least where there's no newspaper stuffed into the cracks. Yates also says the appliances are old and don't work that well. In the bathroom, the tub's finish is all worn off and corroded around the drain.

The landlord never glazed the tub properly, she says. "Inspector asked them to reglaze it. He ain't done that."

Yates says her daughter and grandchildren also had a bedbug infestation last year, which makes paying $727 a month in rent seem like an insult.

A week later, Walker is at the Landlord and Tenant Branch of the D.C. Superior Court.

"I'm basically just here today to try to get justice," she says.

It's the second time she's been in this court since her landlord sued her last November for not paying the rent. Walker has asked for a trial so she can make her case that she shouldn't have to pay until the place is fixed up.

Like other tenants, Walker carries what she hopes will be evidence: a manila envelope filled with papers including lead inspection reports, photos and her handwritten list of everything she says is wrong with the apartment.

"I've complained about it and I've got nothing done," she says.

Still, the legal process is time-consuming and frustrating. That day, there was supposed to be a hearing to decide how much money she should pay into escrow during the trial.

But the landlord's witness didn't show up. After three hours, the parties agreed to postpone the hearing — but Walker had already taken off work, losing a whole day's pay.

"[That is] something that I really can't afford, for them to basically tell me that I have to come back again, you know to take off," she says. "So it's like nothing really got solved today."

That's how it often goes in the court. Few tenants have attorneys — which can put them at a disadvantage because almost every landlord has a lawyer.

Landlords Need To Get Paid, Too

Aaron Sokolow represents Walker's landlord. He wouldn't talk about her specific case, but he did say low-income renters aren't as powerless as it might seem, especially in Washington, where tenant protections are strong.

"In my experience, there's very little risk that a tenant will flat out lose a case because they don't understand what's going on," Sokolow says.

Instead, some tenants have become adept at claiming housing code violations to avoid paying rent, he says. They could take their complaints to a separate housing conditions court. Instead, he says, they go to the landlord tenant branch, where they can drag the process out for months — during which time the landlord doesn't get paid.

"And that's a great frustration for a lot of my clients. They say, 'I'm not excused of my tax payment; I'm not excused of my mortgage payment,' " Sokolow says. "So the notion that I have to come out of pocket for 18 months of litigation, it can get very daunting, very quickly."

Art Nalls is a landlord with two buildings in the city. Nalls thinks it's important that low-income residents have a decent place to live.

"We try to take care of people and we try to offer good decent, affordable housing at a reasonable rate," he says.

But if people don't pay their rent, Nalls says, it's hard to do.

"It means that I can't cover all that other stuff. So I have to call my refrigerator guy and say, 'I'm going to have to pay you next month when I get rent,' " he says. "It's that tight. We're not making a bazillion dollars here."

Nalls thinks one answer is more government subsidies for low-income housing. Otherwise, he says, landlords get tired of the hassle and sell out, which can mean fewer decent, affordable housing units.

According to the Joint Center for Housing Studies at Harvard, the number of low-cost rental units grew only 10 percent over the past decade, while the number of low-income renters grew 40 percent.

Shortage Of Affordable And Safe Housing

"When I turned this on last Saturday, when I flicked this right here, electricity shot out," says Pamula Glover, who was showing me the thermostat in her apartment in Southeast Washington.

Glover was recently in landlord tenant court with some neighbors who were being sued for not paying their rent. Glover says she has water leaks, mold and a constantly beeping fire alarm. She admits $815 a month for a two-bedroom apartment is a bargain, but she still wants to live in a place that is comfortable and safe.

"We don't even have security around here no more. They shoot around here like it's a job," Glover says.

She says the gunfire is so bad at night she sleeps at an angle in her first-floor bedroom to stay out of the line of fire. The company that runs her apartment, Oakmont Management, refused to comment when contacted. It's being sued by the city for unlivable conditions at another apartment complex.

Glover says her place has been allowed to go downhill. She grew up nearby and recalls looking at these apartments, thinking they were so nice, that if she lived in one of these buildings, she'd be rich. Glover, who lives on disability payments, says now she doesn't know where else to go.

Neither does Walker, who doesn't make much above minimum wage.

"I honestly think for me, to get into a decent home with my income, it would be very hard ... because I wouldn't be able to afford it," she says. "Not with the prices that they have these days."

Anything more than $800 a month is out of her league, Walker says. But anything under $800 is pretty much what she already has.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.