FLORENCE — When the new disease first arrived, little was clear beyond the fact that it killed with terrifying speed. Near-certain death trailed the first symptoms by four days or less. The doctors were helpless. This city was soon overwhelmed with corpses. Workers in church yards dug pits down to the water table, layering bodies and dirt, more bodies and dirt.

One writer of the time compared the mass graves to “lasagna.”

Seven centuries later, the plague in Europe stands as an example of a pandemic at its worst — what happens when so many people die so quickly that some foresee the end of the human race. Few places were hit harder than Florence, whose population in 1348 was cut by at least a third and possibly far more.

We had figured a trip to Florence might provide some comforting perspective on modern times — a chance to dwell on a period that was patently deadlier and more fear-inducing than the coronavirus pandemic. But instead, as we spoke with historians and searched for the plague’s lasting marks, what stood out most were the similarities, 672 years apart.

Theirs was a mysterious bacteria spreading at a time when people didn’t yet understand disease transmission; ours, a novel virus infiltrating a world that prides itself on its medical knowledge. But in both cases, the first instinct was to close borders to try to keep the disease at bay. When that didn’t work, officials called for strict rules — but only some people paid attention. All the while, there was a proliferation of conspiracy theories. Many tried to blame the disease on outsiders or minorities — in medieval Europe, often Jews.

“Much has changed since the 1340s,” author John Kelly wrote in his book on the plague, “but not human nature.”

Then like now, people were divided over how to face the threat. Some in Florence shut themselves inside their homes and lived in isolation, according to a detailed account from 14th-century writer and poet Giovanni Boccaccio. Others ventured out in public, armed with herbs and spices intended to purify the air — a medieval version of HVAC filters and masks. Still others were cavalier about the disease and went about their lives socializing, drinking heavily, “satisfying their appetites by any means available,” Boccaccio wrote.

Nobody was safe, and isolation scarcely worked as a safeguard in a dense city. But the people who gathered in groups courted greater risk. Marchionne di Coppo Stefani, a wealthy Florentine, wrote of daring dinner parties in which a host would gather 10 friends, with plans to reconvene again the next night.

At the next dinner, Stefani said, sometimes “two or three were missing.”

Worst of all, in an obvious parallel to the present, many faced their last moments cut off from everybody else, according to accounts from the time. During the plague, these lonely deaths were not the result of public health protocols but the product of sheer terror. People, after the onset of symptoms, were a mortal danger to those around them. So in some cases, family members abandoned sick loved ones, even children. Their deaths were noticed only when neighbors smelled the rotting corpses.

“Many departed this life,” Boccaccio wrote, “without anyone at all as a witness.”

Searching for traces of the plague

The plague lashed Europe again and again over centuries — devastating London in the 1660s and Marseille, France, in 1720 — but nothing was worse than what struck in the late 1340s and early 1350s, when the disease touched almost the entire continent and killed tens of millions of people. This was Europe’s first wave. Florence was one of the hot spots.

To understand what it was like at the time, we enlisted Donatella Lippi, a professor of medical history at the University of Florence, as a tour guide. And on a recent morning, she took us through the city, which in the tourist-free quiet of the coronavirus pandemic looked like a pristine medieval theater set.

In 1348, she said, the city was in its own state of near-lockdown. The inns were closed. The workshops closed, too.

“I imagine Florence at night in this period,” Lippi said. “The city was immersed in darkness.”

People were panicked. It was unclear how the disease spread — but there was no doubt that proximity to others was a risk. Animals — oxen, dogs, pigs — were dying, as well. People wondered whether it was retribution from God. They prayed and disavowed sin. They obsessed about the air and used scents and fires to ward off perceived deadly vapors. They were mostly guessing; scientists wouldn’t know what actually caused the plague — how the bacteria was spread by rats and fleas — until 500 years later.

Among Florence’s hospitals at the time, at least one was accepting the sick, just a small building with a few beds. Lippi guided us around a street corner and there it was: now a facility spanning much of a city block, with a white tent outside, a screening area for potential coronavirus patients.

Lippi led us through the frescoed entranceway, down several corridors, to a quiet courtyard covered in scruffy grass. She explained that in the 18th century, excavators discovered layer upon layer of human bones — hospital dead who went unclaimed by family members. Some bones dated back to the 1300s, meaning they may have died of the plague.

“Probably,” Lippi said. “We don’t know for sure.”

What she does know for sure is that plague pits were dug all over the city and that all the usual customs for grieving together and mourning collapsed. In the absence of family processions, gravediggers desperate for money took over the task of transporting the dead bodies, dropping them in mass graves.

Lippi said that before the coronavirus pandemic, she had studied the plague with the “distance of a historian.” But she thought about the pits of plague victims in March, when hundreds were dying of covid-19, the disease caused by the novel coronavirus, in Italy every day, when crematoriums couldn’t keep up, and when military trucks were called into the city of Bergamo to haul away the dead.

“It’s a very close connection,” she said.

Escaping death by leaving the city

At a time when people were trying to avoid the disease with trial-and-error strategies, only one thing seemed to work: If the plague arrived in your city, drop everything, flee the crowds and take refuge in the countryside.

Boccaccio’s masterpiece, “The Decameron,” was written several years after the disease had swept through Florence and describes a fictional getaway: 10 young characters leaving the plague-hit city and heading into the hills.

The place where they were depicted seeking refuge was most likely Fiesole, a town about six miles northeast of Florence. So one morning — trying to better imagine such an escape — we followed the same winding roads out of town, up the terraced hills, past a smattering of luxury homes. Fiesole has basically become a high-altitude Florentine suburb.

All through the coronavirus pandemic, there have been accounts of people taking their own countryside flights to safety — New Yorkers decamping to the Hamptons, British urbanites seeking out holiday cottages. People were doing much the same thing as Boccaccio’s characters. Amid the coronavirus emergency, they were even fleeing Florence for Fiesole.

We soon found ourselves at an ocher villa talking to Simone Cerrina Feroni, 62. He didn’t live there. It was his ex-wife’s home. But as Italy’s coronavirus crisis deepened this spring, his ex-wife invited him to leave his Florence apartment. He had a heart condition. He would be safer away from the crowds.

He said yes, and he spent the next 50 days at the villa with his ex-wife and her brother, almost never leaving the property. The weather was mild, he said; the air, clean. They had noon lunches with formal table settings and dinner outside in the garden. The danger, he said, always felt far away.

Boccaccio’s 14th-century characters passed their time in self-imposed exile by telling stories about kings, priests and sex. But Cerrina Feroni said his ex-wife had already heard all of his stories many times over, and he had likewise heard all of hers.

So instead, during pandemic lockdown in Fiesole, they watched Netflix.