(CNN) New York City has agreed to temporarily pause relocating homeless residents to Newark, New Jersey, following a lawsuit and claims that the city did not check on the conditions after residents were placed.

Newark Mayor Ras J. Baraka announced the agreement in a news release Monday, saying that the two cities will work together to resolve the issue.

"So far, we've gotten much of what we asked for and we look forward to continue to work collaboratively with New York City to improve the quality of life for their S.O.T.A. recipients," said Mayor Baraka. "For us, this was always about making sure these people were in safe and sanitary housing, and they were handled in a dignified manner, not just jettisoned here with no safety nets."

The city of Newark filed a federal lawsuit last week that claims when New York City case workers would pressure people eligible for the Special One-Time Assistance (SOTA) program, which would move homeless residents to Newark and pay their rent for a year, they did not effectively check on the conditions of the homes to which they were placed.

Some of the conditions were uninhabitable, the suit claimed, with lack of heat and electricity, vermin and dangerous living conditions.

Read More