The families have been forced to live at 222 Protestant and Catholic churches in the country because if they are found in the street they will be arrested.
Currently police are unlikely to enter holy places to remove the groups and send them back to their home country.
The Gohari family is currently living in a suburb of Frankfurt after fleeing Afghanistan in the face of persecution from the Taliban.
As Shia minority Muslims they faced death if they did not leave.
But the father Mehdi told the Telegraph newspaper he had sought asylum in several EU countries but had also been told to try somewhere else.
He tried Greece first: "The officials told us 'It's not our problem. Go somewhere else'," and was told something similar in Holland too.
After being told he would not be allowed to stay in Germany, the Miriamgemeinde, a Protestant church, agreed to take him, his wife and two children.
"I want to thank the church," he said, "they didn't have to help us, but they did. Perhaps they think they helped a family. But I tell you, they saved the lives of four people, five if you include my wife's unborn child."
The church is paying for the family to stay there and has provided mattresses and sheets.
If the family leaves the church building or tiny garden they face being arrested and deported.