NEW YORK — Slipping on a black tricorn hat, 7-year-old Daphne Greene grinned at her mom while they eyed costumes on Thursday at the West Side Judaica & Bookstore on Manhattan’s Upper West Side. Daphne told her mom she should buy the penguin outfit hanging from the ceiling.

Described by some as the “Jewish Halloween,” Purim is a festive holiday where people dress up in elaborate costumes and don masks to celebrate the biblical story of Queen Esther rescuing the Jewish people from mass slaughter. But fear over the spread of the novel coronavirus has several synagogues in New York, D.C. and elsewhere canceling Purim carnivals and gatherings to minimize exposure. The holiday begins Monday night.

Daphne’s mom, Susan Greene, she said she and her family still plan to go to the Purim events at their synagogue, Romemu. She shrugged and said she expects to get the virus eventually, because she and her two daughters pick up so many illnesses in school.

“What are you going to do?” she said. “You’re supposed to be happy for Purim.”

As of Friday afternoon, New York state had confirmed 33 cases of the coronavirus — 29 of them connected to an attorney, with many of those centered on his modern Orthodox synagogue in New Rochelle, which has been shut down until further notice.

Washington, D.C.’s Adas Israel Congregation on Friday canceled its Purim carnival and the party scheduled for after services Monday night. Elsewhere in the United States, Temple De Hirsch Sinai in Seattle shelved its plans for a Star Wars-themed Purim program, and a massive Purim party was reportedly canceled in Lakewood, N.J. Celebrations in places like Israel and Italy also have been canceled.

The historic Spanish and Portuguese Synagogue on New York’s Upper West Side neighborhood will hold Purim services, but the planned dinner and celebration won’t take place, according to Rabbi Emeritus Marc D. Angel. Ansche Chesed synagogue on the Upper West Side also canceled its carnival as a precaution but will hold a service on Monday. Park East Synagogue did the same.

“Usually Purim is the most joyous time,” said Rabbi Benjamin Goldschmidt, assistant rabbi at Park East, which has almost 1,000 members. “My hope is that we’ll wear masks, not out of protection.”

Goldschmidt said this Purim could hold extra symbolism because the holiday is about the hidden danger for the Jewish people.

“Purim is considered a celebration of hidden miracles,” he said. “Hidden or unhidden, we definitely need some divine intervention over here.”

Rabbi Matthew Green, assistant rabbi of Congregation Beth Elohim in Brooklyn, said that the synagogue, in an effort to reduce contact with surfaces touched by other people, will not supply party masks or groggers — noisemakers that are traditionally shaken to drown out the name of the villain Haman during the chanting of the Purim story.

The synagogue is also placing hamantaschen, the traditional triangular cookie with jelly filling, in individual bags instead of large trays. The bags are "not great for the environment, but our best bet, all things considered this week,” Green said in an email.

Congregation Kehilath Jeshurun, a modern Orthodox synagogue on the Upper East Side of Manhattan, expects more than 2,000 people on Purim, compared with average Shabbat attendance of about 800 people. The virus felt like a distant threat until this week, when the cases in New Rochelle and the New York area were reported, said Senior Rabbi Chaim Steinmetz.

“Feeling insecure and threatened is a very uncomfortable place to be,” Steinmetz said. “But I see a lot of a resilience and determination to meet whatever challenges we face. That’s the story of Esther and is one of the grand themes of Jewish history.”

Rabbi Motti Seligson, spokesman for Chabad, a Brooklyn-based organization of Hasidic Jews, said Chabad groups are probably going to wait until Monday to make changes for Purim celebrations, if they are needed.

“It feels very hysterical almost with the panic,” he said. “We’ve been sharing the recommendations and the caution that health officials are suggesting while also trying to avoid anything that may feed into panic.”

Some traditional denominations of Judaism teach that the Megillah, or the book of Esther, must be heard aloud in person on Purim. This year, the Rabbinical Assembly, a body of Conservative rabbis, issued guidance stating: “Hearing the Megillah being read via telephone or live streaming, is permitted when necessary, so long as the sound is undistorted, live and not a recording."

The Rabbinical Council of America, a body of Orthodox rabbis, also issued general guidance for hygienic behavior in synagogues.

Some of the guidelines include asking people not to kiss their fingertips and then touch their hands to Torah scrolls, which is customary during weekday and Sabbath prayer services, and not to make that gesture with mezuzot, the scrolls containing verses of Scripture that Jews place on the doorposts of their homes, business and communal institutions.

In Montgomery County, Maryland, where the first three coronavirus cases were reported Thursday, Rabbi Adam Raskin of Congregation Har Shalom said the Torah will not be paraded around the sanctuary on Saturday; people will be told not to touch the covered scrolls. After services, the challah will be cut with a knife, instead of having children tear it into pieces. Raskin said the congregation will livestream Purim service, but has not canceled its carnival or celebrations.

Other religious groups have also altered their traditions because of the virus: Christians are issuing guidance around taking Communion, and the spread has altered Muslims’ pilgrimage plans.

Several Jewish leaders said they have instructed their members to put their own health above any religious ritual.

On Thursday, a 13-year-old in Manhattan celebrated a “virtual bar mitzvah” through the online platform Zoom, with hundreds of friends and relatives watching on their phones or computers, according to the Wall Street Journal. The scheduled ceremony at a synagogue was canceled because the teenager and many of his classmates were under quarantine after they had attended a bat mitzvah in New Rochelle. A man who was later diagnosed with coronavirus was also at that event.

A kosher grocery on the Upper West Side was bustling Thursday night, as customers were placing orders for the hamantaschen at the bakery counter.

Filling up her basket with jelly filling to make her own version of the holiday pastries, Reina, who spoke on the condition that her last name not be used for privacy reasons, answered her 9-year-old son Asher’s questions about Purim. What if, he asked, you’re listening to the mandatory Megillah reading, and someone sneezes and you can’t hear some of it? That person shouldn’t be in synagogue in the first place, Reina replied.

“People want to maintain what it is to celebrate the holiday in its fullest,” said Reina, who is a pediatric nurse and plans to attend her synagogue’s Purim festivities. “You have to figure out the best way to do it.”

Shira Telushkin, a 29-year-old Jewish writer in Brooklyn, said she and some of her friends — all daughters of rabbis — are planning to dress up as “rabbinical Cats,” with a nod to the “Cats” musical that came out as a movie last year. They plan to dress in all black and cat ears and a tallit, a traditional Jewish prayer shawl.

“If stuff gets canceled, we’ll meet in my apartment because we all have our cats costumes and don’t want them to go to waste,” Telushkin said. “It’s the most fun holiday.”

Shira Dicker, who belongs to Romemu on the Upper West Side, said that her synagogue has the most “over-the-top” Purim celebrations.

This is the best place for costumes. People do social critique or political critique. They’re usually screamingly clever,” she said. “People have talked about coming as a Corona beer. They’re trying to keep it classy, not trashy or traumatic.”

As of Thursday, the party was on track.

“We have a DJ and have an insane dance party. People drink, they’ll have a bar. Are we going to be partying like it’s 1999?” Dicker wondered out loud. “What will the protocol be with cups?”

But the party was canceled on Friday.

In the West Side Judaica & Bookstore, Elizabeth Schultz-Zimmer stopped to buy some books and some gifts of nuts and candy for Purim. She called her rabbi at Chabad of Sutton Place to check on Purim services. The synagogue is open for business, he said.

Schultz-Zimmer, whose Hebrew name is Esther, said she loves the story of Purim because of the holiday’s hidden symbolism and the ultimate triumph of the Jewish people.

“Nothing will dampen the spirits of the Jewish people,” she said as she turned to the store manager. “Did I say it right? I’m not a rabbi.”

He nodded.

This story has been updated to correct which body of rabbis sent guidance about coronavirus and Purim. It was the Rabbinical Assembly, a body of Conservative rabbis. The story has been updated to note the name of Elizabeth Schultz-Zimmer’s synagogue, Chabad of Sutton Place.