With thousands of drug addicts, unemployed workers and mentally ill persons regularly ranting, begging and sleeping on the sidewalks of this otherwise picturesque city, sympathy for their plight appeared to have given way last summer to support for massive arrests.

Saying that citizens and tourists were fed up with trying to navigate around churlish beggars on city streets, Mayor Frank Jordan instructed police in August to move, cite or arrest homeless people for sleeping in parks, blocking sidewalks and begging aggressively. In some instances, shopping carts were seized and belongings hurled into city garbage trucks.

Four homeless men who were ticketed by police have instigated a class-action lawsuit charging that the city is making criminals out of people who are merely poor and desperate.

The suit has prompted Jordan to claim his program, called Matrix, has been misunderstood, and the city once again, like nearly every city across the nation, is searching itself for the causes and solutions to poverty and homelessness.

"I think San Francisco is really divided on this," said local pollster David Binder. "There's a lot of division about whether this is the proper use of police resources and there's general frustration that there's not been any progress. But some people feel Matrix is an attempt to take some action."

Since the inception of Matrix, police have moved, ticketed or arrested people 3,000 times. The program combines police enforcement of nuisance crimes with outreach workers whose mission is to direct the homeless to shelters or drug treatment facilities. The mayor said the social service aspect of his program has been underplayed by the media.

"People say that as a former police chief, I'm taking a hard-headed approach and driving the homeless out of San Francisco," Jordan said. "That couldn't be further from the truth."

He said that in his two years in office, he has brought on line 2,000 moderate and low-income housing units.

In addition, he said, he is seeking to expand the number of drug-treatment slots and early this year will begin guaranteeing some people on general assistance a place to live by sending a portion of their check directly to their residence hotel.

But detractors say the mayor and his administration are determined to reverse any impression that San Francisco, which counts tourism as its No. 1 industry, has any tolerance for homeless people.

"The purpose of the Matrix program is not to enforce misdemeanor statutes," said Alan Schlosser, managing attorney for the American Civil Liberties Union of Northern California and one of the lawyers representing the homeless plaintiffs. "Rather, it is designed and intended to harass, intimidate and detain homeless San Franciscans in an attempt to drive them from the city."

Bobby Joe Joyce, 37, was sleeping on a park bench at Civic Center, across from City Hall, in the chilly predawn of Oct. 18 when the hand of a police officer landed on his shoulder, shook him awake and delivered a $76 citation for sleeping in a park.

"He didn't refer me to any social services," said Joyce, who said he had been turned away that night from an overcrowded shelter that awards beds through a lottery.

Joyce, who had lost his job as a cook, also lost his hotel room when his general assistance money was stopped temporarily.

"The Matrix program makes me feel humiliated about being homeless and poor," said Joyce, one of the plaintiffs.

He'd like to see an outreach program designed by poor people that would simplify the process of getting housing, employment and drug treatment.

Paul Boden, staff coordinator of the Coalition on Homelessness, a grassroots organization staffed by former homeless people, said that instead of venting anger at panhandlers, public officials should take responsibility for creating the sleek new urban renewal projects that have wiped out thousands of low-income housing units in the city.

"These were all decisions made by choice," Boden said. "But all the responsibility is put on people who are poor."