SAN FRANCISCO — An order by the San Francisco authorities to vacate a sidewalk tent camp in a commercial district has rekindled passions over the city’s longstanding homeless problem, which residents say has reached crisis levels.

Inhabitants of the encampment near a Costco and car dealerships defied the city’s order to disperse by Friday, forcing a dilemma for San Francisco’s municipal government, which has until now sought to use gentle persuasion in its dealing with the large homeless population. “I kind of want to stay put and fight it out,” said Elizabeth Stromer, 45, a former nurse who lives in a tent not far from a BMW dealership on the edge of the city’s Mission District. She described the standoff as a “personal battle” between the homeless and the administration of Mayor Edwin M. Lee.

The city targeted 50 tents under a highway overpass — which shelter a small fraction of the more than 6,000 homeless people in the city — because of what it called the “accumulation of garbage, human feces, hypodermic needles, urine odors” and other unsanitary conditions.

The majority of tents were still standing Friday afternoon and many inhabitants vowed to hold their ground. “What we need is a solution,” said a homeless man who gave his name as Santino and said he had no plans to move his tent. “Pushing the homeless around is going to do nothing.” A man on a bicycle stopped to give Mr. Santino a sandwich.