CAIRO — When an Egyptian actress strutted down the red carpet in Cairo last week, twirling and smiling in a revealing lace dress, she had hoped to turn heads in the movie world.

Instead, she now faces criminal charges that could potentially land her in prison.

Three Egyptian lawyers known for using the courts to engage in moral vigilantism filed a lawsuit against the actress, Rania Youssef, accusing her of wearing an outfit at the Cairo International Film Festival that constituted “incitement to debauchery.”

A trial has been scheduled for January, and Ms. Youssef, who is in her 40s, could face a possible five-year jail term if convicted.

The case is the latest in a series of high-profile prosecutions targeting celebrities in Egypt under the authoritarian rule of President Abdel Fattah el-Sisi. They are often brought by lawyers claiming to police public morals by regulating attire, behavior and even jokes under the guise of protecting a brittle version of Egyptian nationalism.

Such prosecutions often ultimately fail. The pop singer Sherine Abdel-Wahab, initially sentenced to six months’ imprisonment for an onstage joke about the quality of water in the notoriously dirty Nile, was acquitted on appeal in May.

But sometimes the charges stick, resulting in prisons sentences for entertainers convicted of breaching public morals. The prosecutions have had a chilling effect on free speech at a time when Egypt’s news media is largely under the sway of Mr. Sisi, and his government has engaged in a harsh crackdown on the gay community.

Egypt’s overcrowded prisons currently include a singer who was imprisoned for making lewd gestures in a pop video, and a female human rights activist who had broadcast a profanity-laced video on Facebook about being sexually harassed in public.

Women’s dress has always been a fault line in the culture wars of Egypt, where the tradition of belly dancing inspires both admiration and revulsion.

The dress that Ms. Youssef wore at the film festival — a semitransparent outfit that exposed most of her legs — led some Egyptians to support her prosecution.

“She, and whoever let her appear like this, must be put on trial,” one person said on Twitter.

Others said the case revealed the mind-set of the men who had brought the charges, using a law that allows one Egyptian to file a lawsuit against another for vague crimes like immorality and “insulting” the nation.

The dress has only exposed your obsession,” the director Amr Salama said on Twitter.

Ms. Youssef apologized for wearing the dress and stressed that she respected Egyptian cultural and moral values. “I didn’t expect this reaction, and if I had known, I wouldn’t have worn this dress,” she said in a statement.

One of the prosecuting lawyers, Samir Sabry, claims to have filed more than 2,700 such lawsuits over 40 years, targeting actors, clerics, politicians and belly dancers. He even sued the makers of a famous puppet show, “Abla Fahita,” for a skit on the novel “Fifty Shades of Grey.” The case failed.

Mr. Sabry, who supports Mr. Sisi, has also brought lawsuits against the president’s political opponents, including members of the Muslim Brotherhood.

In 2013, many Egyptians supported the military takeover that brought Mr. Sisi to power out of fear that the Muslim Brotherhood, whose leader, Mohammed Morsi, was ousted from power, would restrict women’s rights and social freedoms. On Sunday, some noted acerbically on Twitter that those same rights had been eroded under Mr. Sisi.

The vigilante-driven court activism of the Sisi era has also led to harsh restrictions on some minorities, last year prompting the harshest crackdown on the gay community in decades. The case against Ms. Youssef also highlights the highly variable speeds of Egyptian justice.

Charges against public figures involving morality or nationalism often move at a brisk pace — Ms. Youssef is due in court on Jan. 12 — while political prisoners or detained journalists languish in jail for years, awaiting trail in cases that proceed at a crawl.

Such cases also undermine efforts to revive Egypt’s ailing economy by promoting tourism and the country’s ancient heritage. The furor over Ms. Youssef overshadowed an announcement about the discovery of eight startlingly well-preserved mummies in a tomb near the pyramids of Giza.

It also overshadowed the Cairo film festival, which was celebrating its 40th year and awarded its Golden Pyramid prize to the film “A Twelve-Year Night.”

As for Ms. Youssef, she will most likely hope that her coming court case does not become an example of life imitating art.

This year, she finished a movie in which she plays a famous artist who is sent to prison, and struggles to rebuild her life after her release.