As a family sat vigil over a coffin containing the body of an elderly relative, the wooded hills around their apartment building in Palermo burned from wildfires. Winds blew the blazes closer, torching cars, dumpsters, sheds and electricity poles. Then the flames licked the apartment building, forcing its inhabitants to flee.

“We wanted to leave the house, but then the flames were behind the door,” a resident told Live Sicilia television. She said she and her family wrapped their faces in wet towels and, looking for a way out, “knocked on the door where there was the cadaver.” They all managed to escape before the coffin and the rest of the house went up in flames.

Things could hardly be worse for Italy and its Mediterranean neighbors this month. Wildfires and successive heat waves transformed their summer paradises into ghoulish hellscapes. Fires in Greece caused wartime-scale airlifts of tourists and ammunition depots to explode. Sicilian churches burned with the relics of saints inside them. And if it was not the heat, it was hail — the size of billiards in northern Italy — as the country ricocheted between weather extremes.

It was bad enough for those who lived there. But the many tourists who had come looking for a summer holiday found an inferno, and there was more than a hint of buyer’s remorse.

“This was not a good idea,” said Maria Turkovic, 64, from Bosnia, as she prepared for a 2 p.m. tour of the Colosseum in the middle of the heat wave. She sought the shade of a short bush across from the landmark as the temperature hovered around 100 degrees Fahrenheit and a nearby ambulance checked the blood pressure of another tourist.

“My head is burning,” she said. Rather than a vacation, she said she felt trapped in a “nightmare.”

Even as the Mediterranean’s high fever finally broke this past week thanks to the influx of North Atlantic air, the realization that it was not even August — when new bouts of extreme heat are anticipated — dampened any sense of relief. Tour operators, officials and tourists across the region are wondering what happens when a preferred destination for summer getaways becomes a place you absolutely must get away from in the summer.

Countries like Italy and Greece, which increasingly depend on tourism — particularly summer tourism — are staring at a bleak and smoke-filled future, while the damp and chilly places normally shunned by travelers see a future in the sun.

Tourism would drop by 9 percent in the Greek Ionian Islands in a world that reached four degrees Celsius of warming, according to a European Commission report published this year, but it would increase by about 16 percent in western Wales.

“Between the fires, the lack of energy and the broken Catania airport, we are living a nightmare,” said Italy’s civil protection minister, Nello Musumeci, who added that the country was “split in two, between hail and fires,” and was “at the mercy of tropicalization.”

“In the face of climatic phenomenon of this type,” he said, “either we change approach or we will be counting the dead.”

Heat is of course nothing new to this part of the world. For centuries, natives of the southern Mediterranean have coped with the brutal afternoon heat by altering hours, hiding behind the thick walls of their homes and sealing the shutters.

But that seems to no longer suffice. Locals are instead shuddering as the toll of the heat causes hospitals to fill up with the old and stricken, and televisions now routinely broadcast tips on staying cool. For tourists, sightseeing in July has become a form of torture. “My Summer Vacation” essays promise to be horror stories.

“It feels like you are sweating all the time,” said Shelina Radvan, 29, a tourist from Canada, who sat near the Ponte Vecchio in Florence, Italy, during the heat wave. “Many apartments don’t have the A.C. here.”

Locals shifted from being vendors and tour guides to acting as frontline health care workers for wilting tourists.

“You need to cool off, lower your temperature, replenish liquids, sugar, vitamins,” said Alessandro Simoni, whose family has for generations run the grattachecca, or flavored shaved ice stand, just off the Tiber Island in Rome. He said he repeatedly had to bring sugar water to tourists who had collapsed in the heat, and he now felt like “the neighborhood nurse.”

July is poised to be Earth’s hottest month ever. According to the Copernicus Climate Change Service, a European Union-funded research institution, the first three weeks of the month, when an African anticyclone hovered above much of the region like a heat lamp, temperatures in Italy reached as high as 118 degrees. Few experts think that record will last long.

“A foretaste of the future,” said Petteri Taalas, the secretary general of the World Meteorological Organization.

Greece registered its longest and most unrelenting heat wave since people started keeping track. Outside work was banned in the afternoon heat. Archaeological sites were closed. Some 400 wildfires illuminated satellite photographs and devastated olive groves and pine forests, as well as homes, farms and flocks.

The Greek authorities evacuated about 20,000 tourists from the island of Rhodes in an operation that the British news media compared with the evacuation of Dunkirk. The government was exploring issuing holiday vouchers and compensation packages to bring back the tourists who were chased from Rhodes.

The death toll in Greece hit five, including two pilots of a water-bombing plane that crashed while trying to put out the fires. On Thursday afternoon, wildfires torching the center of Greece reached a military warehouse, setting off enormous explosions of ammunition and prompting evacuations of residents and tourists.

In Madrid, the few people out at midday in the Barrio de las Letras avoided the embedded quotations from Quixote, blinding in the sun, and walked in the slivers of shade alongside buildings.

In Sicily, wildfires forced the closure of the island’s two main airports, Palermo and Catania. The island’s governor, Renato Schifani, declared a state of emergency and lamented arsonists, “crazy people” compounding the problem and the relics that were consumed by fire.

“With a heart in tears, it saddens us to tell you that little remains of the bodies of Benedict the Moor and the Blessed Matteo di Agrigento,” the parish priest wrote on Facebook after fires engulfed the church of Santa Maria di Gesù in Palermo. When Italy’s President Sergio Mattarella visited the scene on Friday, a firefighter told him “it was hell.”

On Friday, Pope Francis sent his thoughts of compassion to the victims of climate change, including what Cardinal Pietro Parolin, his second in command, called “grave disasters.”

Those disasters have not just been fires and the insufferable heat. The extreme weather turned the sky into a menace for those who thought they could seek refuge in the mountains, too.

In Italy’s northern provinces, whipping winds and hail larger than tennis balls battered pedestrians, demolished windows and cars, felled hundreds of trees, wiped out orchards and smashed the nose of a plane traveling to the United States, forcing an emergency landing. In Calabria, a 98-year-old man died as the wildfires consumed his home in the Aspromonte mountains.

In Florence, the skin on the shoulders of Michaela Polášková, 46, was blistered as she waited in line in the sun to enter a cathedral.

“We went to the mountains because the beach was too hot for us, but still, I got sun burned,” she said. She could not sleep at night.

“It’s no good,” she lamented. “We love Italy, but the summer is too much for us.”

Elisabetta Povoledo and Gaia Pianigiani contributed reporting.