With its progressive politics and thriving tech industry, Seattle is a city with a swagger. Yet beneath the shiny surface, there is a darker side to America’s fourth richest city, the home to Microsoft, Amazon and Starbucks. The past decade has seen a sharp rise in the number of homeless people – around 3,000 sleep rough, with thousands more in shelters and transitional housing. The search for a solution is dividing the city and pulling on its liberal heartstrings.

After hearing that 47 homeless people had died on the streets last year, in November Mayor Ed Murray declared a state of emergency on the homeless crisis as he asked for more state and federal funding to tackle the problem. Last Tuesday, he made an impassioned, televised speech in which he called for Seattle to unite to solve the problem.

Murray has faced criticism both for being too lenient – encouraging more homeless to come to the city – and too tough. The city has opened more shelters, as well as two “safe lots”, where people living in vehicles can legally park, and two authorised camps. Meanwhile, officials have been conducting controversial “sweeps” of illegal homeless camps (the number rose from 80 in 2012 to more than 530 in 2015), with people given 72 hours’ notice to move along.

Blaming “35 years of cuts to federal affordable housing”, lack of access to mental health treatment and a nationwide heroin epidemic, he said: “We are in the midst of a growing national crisis. People are dying on our streets.”

Last Tuesday night, two people were killed after shooting erupted at a sprawling tent town known as the Jungle, a couple of miles from the city centre. The incident has fuelled fears of a crime wave linked to the rise in homelessness.

Two days later, hundreds of residents from more upmarket areas gathered at Seattle Pacific University for a heated meeting of the Neighborhood Safety Alliance. The group wants more action from the council and police over the rising number of people living in vehicles.

Cindy Pierce, one of its founders, said their arrival had “coincided with increasing property crimes and clear evidence of drug trafficking at all hours of the day and night in clear sight of property owners. Garbage consisting of hypodermic needles and human waste was thrown out of these vehicles.”

Many are angry about what they claim is the lack of enforcement of a law that allows vehicles to park in the same place for 72 hours only. While thousands of people sleep in tents pitched on road verges and under freeways, several hundred live in rundown recreational vehicles (RVs) or cars. They park in industrial zones and in areas where house prices have soared amid rapid gentrification.

One woman who gave her name as Gretchen, who lives in the Magnolia area, showed residents photographs – used needles collected from the streets, a plastic bag of human excrement hanging in a bush and a smashed car window – saying: “Our concerns are real.”

In several neighbourhoods, residents and businesses are clubbing together to hire private security guards. Denis Kurdija, the chief executive of Central Protection, which provides patrols in Magnolia, said: “Residents do feel that police officers consider property crime as a low priority. To us, it is high priority. Although the homeless people and RVs contribute to the crime rate, it also includes professional thieves and burglars. Most of the time, just having visible security prevents the opportunity for them to commit crimes.”

Scott Lindsay, the mayor’s public safety adviser, said property crime had fallen by 10% in 2015, but that in some neighbourhoods the problem had worsened. Seattle was being “slammed by a significant rise in heroin, meth and drug-related crime”, he said. “There is no ‘one-size-fits-all’ solution for the tents and RVs you see out there. For any three tents or RVs, in one there’ll be a homeless family, in another will be a drug addict and the third will be a drug supplier. Those need three different solutions.”

However, the backlash has generated its own backlash. One woman told the gathering, to applause: “You are creating your own hysteria not backed by the data. I understand there is a homeless crisis, but you also need to understand that … [this is partly] because that we have an affordable housing crisis and so, if we’re not looking at the root causes, we won’t solve this issue – we’ll just make it worse.”

Danielle, 45, who lives in an authorised encampment in Ballard, an area known for its craft breweries and farmers’ market, agrees. Until a few weeks ago, she and her husband lived in a flat but they were told it was to be demolished and they were unable to find anywhere else to rent.

Rents are soaring in Seattle – up 12% for a family home in the year to last September. A 2012 study in the Journal of Urban Affairs showed that an increase of $100 in median rents results in a 15% increase in the homeless population.

Sitting among boxes of donated food in the camp kitchen, Danielle said: “It’s something better than nothing here, but I just need a proper place to live so I can get my daughter back.” Her teenage daughter is staying with relatives.

Another camp resident, who gave his name as Roy, said: “I have slept on sidewalks and shelters. It is safer here. There’s danger everywhere on the street – people with mental illness and drug problems. When I was moving in here, a homeless person came up and was yelling and threatening me … this uncontrollable homelessness is a challenge.”

It is a challenge Murray is all too aware of. He summed up the debate raging in the city, where marijuana for recreational use is legal and a $15 minimum wage has been implemented. “The polarised ‘one-size-fits all’ rhetoric we increasingly hear from both sides is unhelpful. Some say we are conducting inhumane sweeps where all we do is force people out of unauthorised encampments, leaving them nowhere else to go. Others claim we are doing nothing and tolerate dangerous criminal behaviour, including drug dealing and property crime.

“Neither of these views describes our efforts. We have adopted the middle approach, one that treats homelessness humanely but doesn’t shy away from doing what we must do to address public health and safety risks.”

Tim Harris, founder of the Real Change homeless newspaper, said Murray is “creating relatively low-cost solutions that at least offer some level of community and safety for people who are outside and struggling to survive. With the encampments and RV lots, he’s tried to create places where people can go, and he’s expanded emergency shelters.”

But he was critical of the sweeps. “They aren’t operating with the transparency that they should. . Everybody isn’t being extended the same offer of services and the same notification.

“We don’t think the sweeps live up to the consistent and compassionate label the mayor’s office has been describing as. What I hear from those sleeping out is that they are a lot more on edge.” So where does this leave the mayor? “Between a rock and a hard place,” said Harris.