A church in the upscale neighborhood of Malibu, California has been told by officials to stop serving food to the homeless because they were attracting too many homeless people.

The United Methodist Church has been offering free meals twice a week to the homeless but said it was going to stop after Thanksgiving because they were luring too many homeless people into the neighborhood. City officials made the decision after speaking with organizers, suggesting they were attracting more homeless people into the city, theLos Angeles Times reported.

At a public hearing last week, Mayor Skylar Peak denied ordering the meals to end, but he also apologized for “miscommunication.” Peak said the city wanted to work with volunteers on a solution.

“I will stand by the fact that everyone up here is compassionate about everyone in the community,” Peak said.

Religious groups fed the homeless for the past 17 years, and the City of Malibu and private donors used thousands of dollars for social workers to find them housing and services. The United Methodist Church and Standing on Stone, a Christian group, had been hosting homeless dinners twice a week on Wednesdays and Thursdays for the past three years.

Malibu has a population of 13,000 and has roughly 180 homeless residents, but no shelter or housing for them. The city is 90 percent white.

A man pushes his belongings in a cart on a street, November 10, 2017 in Los Angeles, California. A church in Malibu, California has said they have been asked by officials to stop serving food to the homeless. Getty Images

Residents complained of homeless people staying by the beach and hanging out near schools. Many say this is because the Metro’s Expo Line opened in Santa Monica last year.

“A homeless person was taking a shower in the girl's locker room in middle school — that wasn’t real good,” Gary Peterson, a retired developer, and hotelier who quit the church’s board of trustees over the meal issue told the LA Times. “Providing dinner is a nice thing to do and a good thing, but it’s the location.”

At one of the final diners last week, 50 people from different parts of Southern California came to eat home-cooked meals of a various array of food.

“This is very sad for us; we’ve been enjoying these friends for more than three years,” Rev. Sandy Liddell, the Methodist church’s pastor, told the LA Times.

Currently, California has the highest rate of homelessness of any state in the U.S. There are 118,142 homeless people living in the state, with over 78,000 individuals without shelter, according to a 2016 annual homeless assessment report.