Three weeks ago, police officers in northern France came knocking on the door of a food bank volunteer named Monique Pouille. They searched her home, hauled her to the station, put her in a jail cell, and kept her in custody for nine hours.

Her alleged crime: providing assistance to some of the illegal immigrants who gather at the port city of Calais in hopes of smuggling themselves across the channel to England. Specifically, Mrs. Pouille recharged their cellphones.

The case of the "good Samaritan grandma," as she is being called, might have remained a blip on the radar here, a one-shot curiosity on the national news. But shortly after Pouille's ordeal, her story found a broader echo in a highly publicized new film about a fictional Frenchman reported to the police, also for helping a young refugee.

The confluence of the two events has set off a lively debate here about the boundaries between compassion and civic duty. The film, "Welcome," tells the story of an ordinary middle-class swimming instructor named Simon, from Calais; and an Iraqi teenager who has sneaked across Europe in a desperate bid to join the girl he loves in London.

Overcoming his initial apathy and suspicion, the Frenchman takes the boy under his wing and into his home, coaching him for what he knows will be an attempt to swim the English Channel. In the eyes of the police, that makes him not just a benefactor but an accomplice.

The film has received glowing reviews as a realistic tale that poses a moral dilemma. In the words of the newspaper Le Monde, it forces the audience to confront the human drama of a desperate migrant and ask themselves, "What would I do in Simon's place?"

Philippe Lioret, who directed "Welcome," took the issue a big step further. He compared migrants with the Jews in World War II, and those who help them to the people who risked their own safety by hiding Jews in Nazi-occupied France.

"The repressive mechanisms ... are strangely similar," says Mr. Lioret, "and so is the way men and women act in the face of this repression."

His comments infuriated the Minister of Immigration, Eric Besson, who called the comparison insulting and inappropriate. The two men have been sparring on television talk shows and in newspapers for two weeks. The public discussion has served to strengthen the resolve of some people who have been helping illegal immigrants for years.

"Lives, destinies are at stake," says Marie-Helene Durantet, a high school teacher who has been organizing demonstrations for eight years on behalf of immigrant students whose families are threatened with deportation.

She works with a volunteer group, Education without Borders, that helps hide undocumented immigrants with French families to keep them out of the reach of the police. Her students have also staged rallies at courthouses, most recently this month, where expulsion cases are being heard.

The help she provides immigrants could get her into trouble with the law, but that is not a big concern. "I'm not really afraid," said Ms. Durantet. "They could come and get me. But I would call all my friends and they would call their friends. There is real public support for this."

Much of the public discussion has centered on how the government enforces a 1945 law that makes it a crime, punishable by up to five years in prison, to aid people living in or transiting France illegally.

Mr. Besson said it is applied against human-trafficking rings, not charities or individuals who simply provide humanitarian relief to undocumented migrants and refugees. But there have been scattered prosecutions over the last few years.

In 2004, for example, Jean-Claude Lenoir, the vice president of a Calais charity that distributes food and clothing to migrants, was convicted of violating the law by picking up money orders for several of them at the local post office. He has also been arrested on charges of interfering with police raids on the makeshift encampment behind the dunes, a squalid meeting point for migrants trying to stow away on ships and trucks transporting goods to Britain. In the course of defending himself, Mr. Lenoir said recently, he has learned that police have eavesdropped on his telephone conversations.

More often, it appears, the law may be invoked as a means of harassing people who regularly defend, support, and assist migrants.

"Since around 2002, we've seen a real increase in the hostility of the authorities," says Laurent Giovannoni, secretary-general of La Cimade, a national advocacy group that provides legal help to immigrants in detention. "Almost every month, someone is taken in for questioning."

The authorities should distinguish between simple acts of kindness and assistance that facilitates the lucrative business of people-smuggling, according to Ludovic Duprey, the chief prosecutor in the northern French town of Hazebrouck.

"But there have been exceptions," he acknowledged in an interview with La Voix du Nord, a regional newspaper. "We've all heard of people convicted for having hid immigrants in their homes."

The case of Pouille, who was recharging migrants' cellphones, illustrates how murky each situation can get.

When the border police questioned her, she said, they reproached her for "indiscriminately" helping the migrants. According to her account, she should have checked whether any of them were using their phones to arrange an illegal border crossing.

"But I don't make the distinction between smugglers and the other poor wretches when I provide this service, or [when] I bring them their clean clothes from the laundromat," she told reporters. "I'm not the police."