A suburban Chicago man has been told to stop the “slumber parties” he hosts in a basement for freezing homeless people — or the home will be condemned.

“I would stay up all night with them and give them coffee and stuff and feed them,” Greg Schiller, of Elgin, told NBC Chicago of the events in his girlfriend’s basement.

Schiller said his reading of city code allows for “slumber parties,” but city officials claim that code applies to children’s parties, not adults.

According to the city, the “parties” Schiller hosts a few times a week actually make the home a “rooming house,” which is prohibited by city code, the Chicago Tribune reported.

Schiller has been cited twice in two years for trying to provide a refuge for the homeless.

On Tuesday, city officials entered the basement and said they found the ceiling height too low and windows placed too high up and too small.

“They shut me down and said I have 24 hours to return my basement to storage and take down — I have several cots with sleeping bags for everybody — or they’ll condemn the house,” Schiller said.

The city was first alerted that Schiller was using the home’s garage as a shelter in 2016 when paramedics were called there for a medical situation.

Coby Basham, Elgin’s department of neighborhood services director, said that when code officials tried to enter the home’s basement in early December 2017, they were denied access.

So the home’s owner, Teresa Quarles — Schiller’s girlfriend — was cited for things that code inspectors could see, like a broken front widow, an outdoor port-a-potty and a commercial trailer on the property.

She called the city’s actions “reprehensible.”

“We are talking about people’s lives,” she said.

Schiller said he’s opened the basement to vagrants about five or six times this season when wind chills were at 15 degrees or less and that he prohibits drugs and alcohol.

“They watch movies with me. It is an option to get in out of the cold,” he said.

Temperatures in Elgin on Wednesday reached a low of minus 4 degrees.

“It’s cold enough to freeze to death,” Schiller added, pointing out that his makeshift basement shelter is only open when the emergency shelter at the First United Methodist Church of Elgin is not.

But city officials said the church shelter has a license and has been inspected.

“To be a shelter, you have to have a license. There are churches that have licenses — he doesn’t,” Basham said. “He is pushing the envelope as to rationale.”

Schiller said that while he does plan to stop hosting the slumber parties, he’s working on other options to help the homeless he now knows so well.