Every night before bed, in her tent on the narrow patch of grass at 18th and Vine, Luz Cordero would pray that a car wouldn’t jump the curb and run over the place she and Richard Ruiz slept. “Oh, my god,” she would whisper. “I hope we make it through this night.”

And she and Richard, her partner of seven years, would hold each other in the darkness.

Inseparable. That’s how everyone — from the people they lived with in the tent city on Vine Street to the Project HOME outreach workers who visited every day — knew Richard and Luz to be. They were going through this struggle together.

Through addiction, poverty, and eventually homelessness, their relationship has always been the strongest foundation they had. Luz finds Richard goodhearted and kind. With him, in the tent, she felt safe. Richard has in her a motivator, someone to lean on the times they have tried to get sober.

As their addictions to crack cocaine deepened, they moved from a barely inhabitable apartment at Fifth and Dauphin to abandoned houses in Kensington, where they would wake sometimes to find raccoons peering over the blankets.

Last year, Luz managed to get a placement at a women’s safe haven run by Project HOME in Center City.

Not long after, Richard got a spot in a shelter for men in Center City, with the help of outreach worker Ed Dover, who had been immediately drawn to the couple, whom he met one day at a soup kitchen. But Dover knew placing Richard and Luz together would be a challenge.

In an overburdened shelter system, housing for couples is extremely scarce.

Part of it is a resource problem. But part of it is simply how the system was designed decades ago — a system that separated men and women, and didn’t take enough account of communities and relationships that people build on the street. And it’s hard to bring about systemic change when the system is struggling to make up for the lack of affordable housing in Philadelphia.

Richard and Luz missed each other. Sometimes, they would spend the night outside, at Logan Circle, just to be together. Luz would persuade Richard to lay their bedding behind a cluster of bushes. She was too ashamed to be seen: She had a bed. But it wasn’t next to Richard.

Apart, they spiraled. Four months ago, Luz found Richard in the tent on Vine Street. She couldn’t leave him there. She tried to make the best of it. “We had lived in abandos in Kensington. To live in a tent in Center City, that was luxury,” she said.

And so they lived in the tent on the side of the expressway.

“We stayed there because it was a place we could be together,” Richard said.

When word came down that the city was planning to clear the encampment, Dover drove over each morning and watched people emerge from the tents, hoping to recognize someone. One morning, he saw Richard and Luz — the couple he had promised to help from day one.

He went to work trying to find them a placement — together. The waiting list for couples stretched into the dozens. But when the bigwigs from City Hall arrived at the encampment last month — to take stock before the closing — they cleared the red tape.

In December, the call came. A spot had opened up for Richard and Luz at Sacred Heart Recovery Residence, a former hospice once run by Dominican sisters that’s now used by Project HOME.

“It brought tears to my eyes that they finally got a place together,” Dover said.

Richard and Luz took only their clothes and two blankets from the tent. By the time the encampment was closed for good on Monday — a move that was met with some protest — they had been at Sacred Heart for three weeks. About 35 people had lived with them on Vine Street, the city said. Outreach workers were able to get 20 inside. Advocates reluctant to see communities displaced from the camp said they were relieved to see the city offering social services rather than police enforcement.

“Look how we have this,” Luz said on Friday, showing me the room. It was meticulous, full of pictures of her grandchildren. Her novels were stacked on the nightstand. The closet was military-clean. They have been working in the Sacred Heart kitchen, seeing doctors, and moving toward getting their own place — somewhere they can reunite with their families.

For all the blessings of the room, there’s a special one in Luz’s heart — the view of the Sacred Heart grotto from her window, with a statue of the Blessed Virgin Mary. And the woman who once prayed in a tent every morning now turns to the window and thanks God for their new home.