In late 1582, the people of Alghero, a town on the island of Sardinia, Italy, fell victim to a plague outbreak that killed more than half the population. If not for a quick-thinking doctor named Quinto Tiberio Angelerio, the devastation could have been much worse.

Having worked in Sicily during a bout of plague in 1575, Angelerio was both familiar with signs of the disease and practiced in preventing its transmission. So when three people died after experiencing plague-like symptoms, Angelerio went straight to the town leaders and asked them to begin isolating other patients. The magistrates and senators brushed off his warnings as alarmist, but the viceroy took heed. Soon, the city was completely closed off, and guards patrolled the borders to ensure compliance.

As BBC Future reports, residents railed against the sudden shutdown of Alghero and even threatened to lynch Angelerio. It wasn’t until after the plague had already spread throughout the city that the doctor was given the authority to institute further safety measures. He later detailed his public health program in a 1588 pamphlet titled Ectypa Pestilentis Status Algheriae Sardiniae.

Some of his 67 rules for de-plaguing a city are medically dubious, to say the least. His very first recommendation, for example, was for “fasts, prayers, vows, and good actions … to appease the wrath of God,” since the plague “is considered a divine punishment.” Rule 49, to be carried out toward the end of the outbreak, was to bring “a high number of male and female goats” into the city and put one in each plague patient’s house. (As 16th-century French surgeon Ambroise Paré explained in A Treatise of the Plague, some people believed that a goat's foul odor left no room for “pestilent” plague-filled air.)

Other instructions, detailed in a 2013 study published in Emerging Infectious Diseases, are surprisingly modern. “Meetings, dances, and entertainments are strictly forbidden,” Angelerio wrote. He encouraged citizens to disinfect (often with heat) anything that had been near a plague-stricken person. Everyone was confined to their houses, and anyone who needed to go shopping or run another necessary errand had to get permission from the Morber (a “health guard” of sorts who enforced plague policies).

But permission wasn’t enough. “People allowed to go out must bear with them a cane measuring 6 feet long,” Angelerio wrote. “It is mandatory that people keep this distance from one another.” He doesn’t explain why he chose that particular length; perhaps he thought any cane longer than 6 feet would be unwieldy or difficult to procure. Or maybe, like some modern-day physicians, he believed the air wouldn’t easily carry pathogens beyond that distance. In any case, the precaution seems eerily prescient in the wake of our current social distancing protocols.

While it’s impossible to know how many lives Angelerio saved with his practices—or how many people actually ventured forth with 6-foot canes—the plague was gone from Alghero within about eight months. And when the city suffered another outbreak during the 1650s, officials relied on Angelerio’s pamphlet to see them through it again.