A man from a suburb of Chicago who opened his basement to homeless people on freezing nights last month has complied with a local government order to stop.

“These people are my friends,” the man, Greg Schiller, who has worked with the homeless community in Elgin, Ill., for several years, said in an interview with AM 560 in Chicago on Friday. “This is basically the city telling me who I can have over, who my friends can be and where we can congregate in my home.”

He called the gatherings “movie nights” and said he had offered hot drinks and snacks. At most, 15 people stayed, he said, adding that he remained up all night to supervise the gathering.

But city officials on Friday said the arrangement was unlawful and a zoning and public safety issue, as well as a property maintenance issue.