Media playback is unsupported on your device Media caption Baby Shark: It's got a catchy tune and plans for world domination - but the toddler hit is older than you think

Officials in West Palm Beach, Florida are trying a new method of driving homeless people away from a city-owned rental facility: children's music.

The wildly popular and extremely repetitive children's songs, Baby Shark and Raining Tacos, play on an endless loop through the night.

Mayor Keith James told the BBC it is a temporary measure to keep the homeless from the city's waterfront space.

But advocates for the homeless say it is cruel treatment of those in need.

Officials say the children's songs serve as a deterrent around the city's Lake Pavilion, a glass-walled events venue overlooking the downtown waterfront that hosted 164 events over the last year.

Image copyright Leon Neal/Getty Images Image caption The widely popular children's song "Baby Shark" is being used to drive away the homeless

West Palm Beach expects to collect $240,000 (£193,000) this coming year from such events.

In recent weeks, Mr James says, "unpleasant remnants" like human faeces have been found around the pavilion's entrance.

"When people pay good money for it, they should be able to enjoy the facility they pay for," Mr James says, adding it was important to keep the area "pristine".

The particular songs were chosen, he notes, "because they're pretty aggravating if you hear them over and over".

But to advocates for the homeless, an incessant loop of Baby Shark and Raining Tacos is considered cruel punishment for vulnerable people with nowhere else to go.

"These are people who are already in desperate straits and this is an effort to make life even more miserable for them," says Maria Foscarinis, founder and executive director of the National Law Center on Homelessness and Poverty. "Driving them out by blaring music is just inhumane and really shocking."

And the technique - Baby Shark and Raining Tacos - is particularly insidious, she adds.

"How horrible to take something that is meant in such an innocent way and use it in such a mean and really evil way," Ms Foscarinis says.

Image copyright Saul Martinez/Getty Images Image caption A coast guard patrol in West Palm Beach, Florida

There are approximately 354 individuals experiencing homelessness in West Palm Beach - a decrease of 24% from the year before, according to Mr James.

And teams are sent out on the street every week, he says, to assist the homeless population, guiding them to shelters and providing medical care.

As a result of these efforts around six people are placed in temporary or transitional housing each week.

"I'm very proud of our record," Mr James said.

Florida is home to approximately 31,030 individuals without a home - just less than 6% of the nation's total.

Ms Foscarinis says the state should not be singled out for the size of its homeless population, but adds: "But I would single Florida out for the cruelty".

Image copyright The Washington Post via Getty Images Image caption Homeless men and women sleep outside in Sarasota, Florida

She compared the use of Baby Shark and Raining Tacos to a national trend of "hostile architecture", which renders public spaces inhospitable to the homeless.

Sloped or segmented bus benches, uncomfortably coarse pavement and spiked window sills have all been used to drive away the homeless.

And this is not the first time that music has been used as a deterrent. Three years ago, officials in nearby Lake Worth Beach tried using classical music to drive away drug dealers and the homeless, US media report.

The method proved ineffective as the targeted groups appeared to enjoy the classical tunes.

The issue with these methods, Ms Foscarinis says, is the assumption that people have other options.

"But the solution isn't to drive these people away by making their lives even more miserable. The solution is to work together to create real alternatives."