Let’s start with a little quiz: You’re walking past a street corner in your neighborhood and you notice a man sitting on an orange crate and holding up a hand-lettered sign that says, “Homeless. Please Help.” Is he threatening or harassing you in any way? You’d most likely say no. If so, you’re in agreement with most Americans and virtually every court that has ruled on the subject in the past two decades. Asking for money in that situation is considered to be a form of free speech, protected by the First Amendment.

How about this one: You’re making an ATM withdrawal and a teenager comes up to you and says politely, “I sure could use one of those twenties you’re taking out of there.” That’s a different story. Local governments all over the country consider that sort of thing to be illegal harassment and have made it a crime.

Now we get to a harder case: You’re standing in a long line waiting to buy tickets to a concert. A young woman walks alongside, telling the people in line that she’s hungry and needs some spare change so she can buy herself dinner. Is that against the law?

The answer is that it’s legal in most places, but illegal under the terms of some tough panhandling laws that communities around the country have been passing. According to the reasoning undergirding those laws, anyone standing in a line like that is a kind of captive, unable to move out of the way, just as they would be in a closed subway car. Soliciting anyone in a captive situation constitutes aggressive panhandling and is subject to a fine or even, in some cases, a stint in the county jail. But it’s also arguable, and civil libertarians will press the point, that a person is no more captive standing in line than he is walking down the street, and the panhandler is the one whose rights are being curtailed. Whichever side you’re on, it’s a pretty close question.

But it’s one of many legal puzzles that have come up in recent months as courts and communities try to work out the rules of lawful behavior in public places. The rules at the far ends have been established: Simple begging is protected speech; aggressive solicitation is not. It’s the behavior in the middle that’s being fought over.

And it’s coming up often these days for a couple of interesting reasons. One is the increasingly broad definition of free speech that federal courts, including the U.S. Supreme Court, have chosen to stake out. The other is the growing attractiveness of city centers as entertainment districts, both for tourists and local residents out for dinner and a good time. Urbanites are hanging out downtown in numbers that would have been unthinkable a couple of decades ago. Panhandlers are hanging out there too -- after all, it’s where the money is. That’s essentially what this conflict is all about.

There is some statistical evidence that the cities’ worries are rational. A recent survey conducted in Salt Lake City reported that 20 percent of those who avoided going downtown said it was because of aggressive panhandling. Other cities seem to harbor similar fears for their spruced-up and newly welcoming downtown districts. They’re seeking ways to keep visitors from being hassled without violating the First Amendment strictures that the courts have laid down.

There are several possible ways to do this. One is to declare certain parts of downtown off limits to panhandlers -- not just ATMs or ticket lines but anything within a specified distance of a sidewalk café, a bus stop or even a parking meter. All of these have been tried. So have restrictions based on the time of day: No panhandling before sunrise or after sunset. The only thing cities know for sure that they can’t do is discriminate based on the content of the solicitor’s message.

The U.S. Supreme Court tightened the rules this June in the case of Reed v. Town of Gilbert. This wasn’t a panhandling case per se, but it raised some of the issues common to any dispute over solicitation. The Arizona town had passed ordinances delineating rules for signs displayed in public places. Those rules determined how large the signs could be, where they could be placed and how soon they had to be taken down. Political signs were allowed to be larger than religious ones and didn’t have to come down as quickly. Pastor Clyde Reed of the Good News Presbyterian Church sued the city, claiming that the stricter rules governing the church signs violated his First Amendment rights. He lost at the federal appeals court, but the Supreme Court reversed that verdict, ruling that the signs were free speech and the ordinance was a discrimination on the basis of content.

The Reed decision didn’t settle anything in the broader panhandling dispute, but it did focus attention on the case that is liable to provide some definitive answers in that argument: Thayer v. Worcester. In 2013, Worcester, Mass., enacted one of the nation’s toughest and most comprehensive panhandling laws. In an effort to prevent what it called “fraud or duress,” Worcester outlawed panhandling within 20 feet of an outdoor café, bus stop or ATM, and within 20 feet of “any place of public assembly.” It is illegal in Worcester to ask for money after sundown or before sunrise. As City Attorney David Moore puts it, “Approaching someone at night has a fear or intimidation factor that isn’t present in the daytime.” Moore said recently that since the law’s enactment, there had been nearly 200 incidents of enforcement, all of them in cases where the panhandler refused to desist after a warning and was fined $50.

All in all, the Worcester law makes it rather difficult to be a panhandler anywhere near a large group of people, which is where any sensible panhandler would want to operate. Caught in one of the many solicitation-free zones, a panhandler in Worcester can be found guilty of a criminal violation just for holding a cup or carrying an “I’m hungry” sign.

But there was one thing Worcester tried hard not to do: discriminate on the basis of content. The Girl Scouts, the Salvation Army and local sports teams are subject to the same restrictions as a homeless person seeking money for unspecified refreshment. As long as the city kept its law content-neutral, the Worcester City Council believed, it could go as far as it wanted regarding time, place and circumstance.

Worcester is winning. Last year, in a case brought by the American Civil Liberties Union, a federal appeals court held that the city’s rules are legal. The judge who issued that ruling was former U.S. Supreme Court Justice David Souter, serving on the appeals bench as a senior replacement. Souter wrote that aggressive soliciting can cause “serious apprehensiveness, real or apparent coercion, physical offense or even danger,” and that communities were entitled to take strong measures to guard against it.

The contest is not over. In June, the U.S. Supreme Court ordered the appeals court to review its Worcester finding in view of the decision in the Arizona church case. The plaintiffs in the Worcester case argue that that city’s law is not content-neutral; they say the fact that panhandling may make some people uncomfortable is no justification for such a sweeping law against it. The plaintiffs are also citing the 2014 Supreme Court decision in McCullen v. Coakley, which ruled on free speech grounds against the creation of 35-foot buffer zones to protect abortion clinics from aggressive protesters. Defenders of the Worcester law counter that any effort to link abortion to panhandling is misguided.

It is likely to take several months, at least, before all of this is sorted out. In the meantime, cities all over the country continue to test the limits of what they can and can’t do to control panhandling. In many cases, their efforts are clear reflections of the contest between visitor appeal and the First Amendment.

Lowell, Mass., 35 miles from Worcester, enacted an even bigger buffer zone to ward off aggressive panhandling. It encompasses the city’s entire historic district -- essentially the whole downtown. “The law in Lowell was a result of pressures in the business community. Panhandlers were driving away tourists and customers,” says Kevin Martin, a lawyer who is representing the Worcester panhandlers in court. Tampa, Fla., passed a similar law aimed at curtailing solicitation in its Ybor City district, a popular nightlife magnet.

Whatever experiments they wish to try, cities may want to tread carefully. Some of the more creative antipanhandling laws can produce unintended consequences. Muskogee, Okla., decided in 2013 to allow panhandlers to operate, but to require them to obtain an annual permit and wear a neon vest identifying them to the public. A local reporter who checked on the results of the experiment after the first year found that panhandlers were happy with it and that some were arriving from other towns just to work in a protected environment. Shortly after that, the city did away with the permits. “People thought we were saying ‘Come into town and try it,’” says Deputy City Attorney Matthew Beese. Now panhandlers have to register with the police every three months. They still wear the vests.