This week is one of the holiest of the year on many religious calendars, with Passover beginning on Wednesday night and Easter taking place on Sunday. But amid the spread of COVID-19, many of the traditional gatherings to mark those holidays are being pushed online, with observers turning to virtual Passover seders and Easter masses.

But, though those socially distant holidays may look very different from what celebrants are used to, they are themselves part of a long tradition. Just as disease is not a new part of human life, religious rituals and celebrations have adapted to past pandemics too.

Examples of such adaptation can be found going all the way back to the plague that swept Italy in 1630. The world’s first ghetto had been created in Venice in the previous century, and by the 17th century Jewish populations in other cities, including Padua, likewise lived in restricted areas. It was in the Padua Ghetto that the physician Abraham Catalano worked with local officials to figure out how Padua’s Jewish community could celebrate Passover despite the epidemic, Susan L. Einbinder, author of After the Black Death: Plague and Commemoration Among Iberian Jews, told TIME in an email.

“The city government would close the Ghetto in times of epidemic and goods could not come in or out. The Ghetto ordered extra flour to be stored separately in case they would be closed when they needed it to make matzah,” Einbinder explains.

Catalano also observed that, during the plague, synagogues were not able to meet their 10-person quorum necessary for services, and that both Jewish people and Christians were finding new ways to worship at home, observing that they “prayed from their windows, or stood by the windows where they could hear prayers,” according to Einbinder.

Some theories even hold that Passover helped protect some Jewish people from contracting the bubonic plague in earlier pandemics, as observance requires Jewish people to get rid of even the smallest amount of grain from their households; for a disease spread by rodents, that tradition might have been lifesaving, particularly as the plague tended to peak in the spring, right around the time of the holiday. That coincidence may have led to a backlash, however, as Jewish survivors became resented and persecuted and blamed for the “Black Death,” according to Martin J. Blaser, Professor of Medicine and Microbiology at Rutgers University.

Get your history fix in one place: sign up for the weekly TIME History newsletter

Some religious responses to disease went beyond adaptation, in attempts to find religious causes and solutions for outbreaks.

Among Catholics during the period of the 17th century plague, for example, people were encouraged to go to church more often, go to confession more often and organize more religious processions through towns and marketplaces — all to ask for forgiveness from God, who was thought to be punishing society with plague, medieval historian Winston E. Black, author of Medicine and Healing in the Premodern West: A History in Documents, said on America magazine’s podcast “Jesuitical.”

And in the late 19th century and early 20th century, some people turned to an old Jewish ritual to try to ward off disease: two strangers would wed in a so-called black wedding at a cemetery. Eastern European Jewish people had occasionally performed “black weddings” during the 1892 cholera outbreak, and when the flu was rapidly spreading in U.S. cities in the fall of 1918, a small group of Jewish immigrants were believed to have carried over that tradition to their new homes, per research by Charlie Hersh, Education Coordinator at the National Museum of American Jewish History in Philadelphia.

Many others, however, feared the ritual would only make things worse. For example, The Jewish Exponent reported on a black wedding on Nov. 15, 1918, in New York City between Rose Schwartz and Abraham Lachterman at Mount Hebron Cemetery, where they were “cheered on by 2,000 people” — though the paper also called the Philadelphia wedding “the most deplorable exhibition of benighted superstition” and lamented that “the publicity given to the occurrence will convey to many people the impression that this is a custom sanctioned and encouraged by the Jewish religion.”

In general, as medical knowledge about disease transmission expanded, religious adaptations began to look more like the kind of social distancing seen today in response to the novel coronavirus. In 1918, public-health officials cracked down on religious gatherings that were seen as opportunities for the flu to spread.

In Washington, D.C., in the fall of 1918, some churches held services outdoors thinking that was better ventilated, until the local health commissioner banned those too. Pastors suggested residents carve out solo time on Sunday morning to pray. A Presbyterian church told worshipers to pray that healthcare workers and public servants “may be led in their performance of duty and be strengthened by divine help, that the people may be wise and courageous.”

Newspapers like the Louisville Courier-Journal also began publishing sermons on Sundays “as a substitute for church services made impossible today by reason of the influenza ‘epidemic,'” per research in the University of Michigan’s archive of newspaper coverage of the 1918 flu pandemic by Chris Gehrz, Bethel University Professor of History. One sermon by Reverend W.W. Landrum in Louisville reminded worshipers that “while a building may promote as it usually does the well-being of a church it is not necessary to its existence.”

More recently, during the 2003 SARS epidemic, churches nixed several aspects of Holy Week and Easter Sunday services. In Toronto, which had a cluster of cases, churchgoers were advised not to kiss the cross, share cups of wine or use a confession booth. Instead of shaking hands to share the sign of peace, people bowed to one another. Many worshipers wore masks, and microphones had special coverings. In Hong Kong, the Roman Catholic diocese urged priests to wear surgical masks, prohibited the distribution of palm leaves for Palm Sunday and recommended the cancellation of the planned washing of feet. Some churches removed holy water and hymnbooks.

But holidays during times of pandemic have also provided opportunities for worshipers to practice their faith in ways other than by attending a service, mainly through serving and reaching out to the sick. Newspapers reported on Christian efforts to deliver food to the needy during the 1918 flu pandemic. And in 1989, amid the AIDS crisis, Rabbi Jerome Epstein hosted a New York City Passover seder for Jewish people with AIDS whose families were afraid to invite them because of the disease. One attendee, Ken Meyerson, 48, told the New York Times that the service gave him “hope.”

And after all, while religions may differ by their practices and beliefs, hope is at the core of this season. When Pope Francis offered a rare blessing to the world in an empty, rain-drenched St. Peter’s Square on March 27, he struck the same note about facing COVID-19: “The strength of faith,” he said, “frees us from fear and gives us hope.”

The Coronavirus Brief. Everything you need to know about the global spread of COVID-19 Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Olivia B. Waxman at olivia.waxman@time.com.