As they built their dream house last year on the shimmering sands of the Gulf of Mexico, Russell King and his nephew, Dr. Lebron Lackey, painstakingly documented every detail of the elevated construction, from the 40-foot pilings buried into the ground to the types of screws drilled into the walls. They picked gleaming paints from a palette of shore colors, chose salt-tolerant species to plant in the beach dunes, and christened their creation the Sand Palace of Mexico Beach.

They also installed an outdoor security camera. Its video footage became the only view of their property as Hurricane Michael thundered ashore earlier this month, the most intense storm recorded in the history of the Florida Panhandle.

The camera showed a horrifying tunnel of gray fury worsening by the hour as Lackey, a 54-year-old radiologist, stared helplessly from more than 400 miles away at the corner of his roof.

"It would buck like an airplane wing," he said from his residence in Cleveland, Tennessee. "I kept expecting to see it tear off."

But it did not. When The New York Times published an analysis of aerial images showing a mile-long stretch of Mexico Beach where at least three-quarters of the buildings were damaged, Lackey saw his Sand Palace still standing, majestic amid the apocalyptic wreckage, the last surviving beachfront house on his block.

"We wanted to build it for the big one," he said. "We just never knew we'd find the big one so fast."

The story of how the Sand Palace made it through Michael while most of its neighbors collapsed is one about building in hurricane-prone Florida, and how construction regulations failed to imagine the Category 4 monster's catastrophic destruction.

Florida's building code, put into effect in 2002, is famously stringent when it comes to windstorm resistance for homes built a long the hurricane-prone Atlantic shoreline. But it is less so for structures along the Panhandle, a region historically unaffected by storms as strong as the ones that have slammed into South Florida.

After Hurricane Andrew, a Category 5 beast, ravaged Miami-Dade County in 1992, new construction in the southern portion of the state was required to withstand 175 mph winds. In the coastal Panhandle counties affected by Michael, the requirement is lower, 120 to 150 mph, and the rules for certain kinds of reinforcement have applied to houses built more than a mile from shore only since 2007. Many of the residences and businesses rubbed out by Michael in Mexico Beach were far older; rebuilding them to conform to the new code will be expensive and could price out some of the working-class people who historically have flocked to Mexico Beach.

King would not say how much he and Lackey spent to fortify the beachside home, which public records show has been assessed for tax purposes at a value of $400,000. Their architect, Charles A. Gaskin, said that building a house the way they did roughly doubles the cost per square foot, compared with ordinary building practices.

Other experts had different views of the expense required. An estimate published in Forbes in 2012 said implementing an array of storm-resistance measures, including some of those advised by the Insurance Institute for Business and Home Safety, would add more than $30,000 to the cost of a typical house.

"Every time something like this happens, you have to say to yourself, 'Is there something we can do better?'" Gov. Rick Scott told reporters, as public officials were called upon once again to examine the state's building standards.

"When I saw this hurricane's wind speeds, I knew: You could only hope there would not be too many fatalities," said Charlie Danger, a retired Miami-Dade building chief who crusaded for stricter windstorm codes. "It pays to rebuild structures that withstand something like that. You minimize the loss of life — and the loss of infrastructure. If you lose the infrastructure, you lose everything."

Lackey said he and King, who jointly own the Mexico Beach house, did not even refer to the minimum wind resistance required in Bay County. They built the Sand Palace to withstand 250 mph winds.

The house was fashioned from poured concrete, reinforced by steel cables and rebar, with additional concrete bolstering the corners of the house. The space under the roof was minimized so that wind could not sneak in underneath and lift it off. The home's elevation, on high pilings, was meant to keep it above the surge of seawater that usually accompanies powerful hurricanes.

"We're thinking that we need to build a house that would survive for generations," Lackey said.

"I believe the planet's getting warmer and the storms are getting stronger," said King, 68, an attorney. "We didn't used to have storms like this. So people who live on the coast have to be ready for it."

Though the family had the relief of knowing their house, which they rent out when they are not using it themselves for vacations, had remained standing, King needed to see for himself what damage the hurricane had done. He left Tennessee at 4 a.m. Saturday and drove his dark blue Ford F-150 pickup south for more than seven hours — far longer than the trip would ordinarily take, because of closed roads and recovery-crew gridlock — to reach his property at the end of 36th Street. The siding that had wrapped around a stairway providing access to the elevated house was gone, and so were the stairs. But that was by design: The family's architect used breakaway walls that would tear free without ripping off any more of the structure. Now there was just a gaping hole and part of a handrail, leaving the five- bedroom, five-bathroom house accessible only by ladder.

Up climbed King, awed by the fact that the structure had otherwise suffered only a little water damage and one cracked shower window. Even their in-home elevator appeared untouched.

"We can clean this up in a month," he said. "But other folks, I don't know. Look at what these people suffered."

The duplexes next door were wiped out. Three homes across the street were leveled down to concrete slabs. A fourth house, standing but with much of the roof and some walls caved in, was being searched by a rescue team; two renters were unaccounted for, according to King. That house, too, he said, had been built with hurricanes in mind.

"It was supposed to be a fortress like this," King said, staring in disbelief.

He said he previously owned a house on 42nd Street that still had watermarks in it from Hurricane Opal, the 1995 storm that until a few days ago had been a local benchmark for powerful cyclones. From his deck, King pointed: "It was down there, and it's gone."

"That's the famous Mexico Beach pier," he added, nodding toward a few decapitated wood pilings sticking out of the water.

Up 36th Street, north of U.S. Highway 98, the main drag, more small houses had survived the wind but were gutted by the water, even though they were several blocks inland from the beach. John Hamilton spent a weekend afternoon shoveling dark muck out of the house belonging to his sister-in-law, Sandra Richards, and her husband, Jeff Richards, who live in Eufaula, Alabama, but have vacationed in Mexico Beach for decades.

Paper towels in the highest kitchen cabinets were soaked. Fans on the ceiling, more than 8 feet up, were caked in mud.

"I can't believe I'm not just crying my eyes out," Sandra said as her sister, Laura Hamilton, used a broken piece of door as a dustpan. "It's incomprehensible."

Jeff noted that the couple built the house with hurricane-resistant windows in 2004, after the new statewide code went into effect. "Look at the windows: They're all here," he said. "If the doors had held, we probably would have been all right."

"All those Mexico Beach houses that were built in the 1970s, they're gone," Sandra said.

Lackey said much of the small town's charm came from its older houses and relative lack of overdevelopment, compared with bigger tourist destinations farther west along the coast. Over the Fourth of July holiday, which Mexico Beach celebrated with fireworks at the pier, Lackey's 5-year-old son, Keaton, learned how to snorkel off the beach in front of the house.

"There was a Subway — that was the one franchise eatery in town," he said. "There were no traffic lights. It was nicknamed 'Mayberry by the Sea.'"

King said he assumed Michael would spare the town, as other hurricanes had done.

"I said, 'It'll veer off. They always do. They go to Cancún or someplace,'" he said.

As the storm took aim, though, their most recent renters brought the patio furniture indoors and oversaw a specialist hired by Lackey and King to seal the doors the day before landfall — the sort of measure Lackey readily acknowledges may be unaffordable for most people during an emergency. The renters ate at a beloved local seafood restaurant, Toucan's, and then evacuated from town.

"They were probably the last people to eat there," Lackey said of Toucan's, which did not survive.

A few days after the storm, the inside of the Sand Palace, immaculately decorated, remained surprisingly cool, a feature of its concrete walls. King said he hoped recovery crews from the Federal Emergency Management Agency could benefit from using their standing structure.

"If FEMA wants the house, they can have it for a few weeks," he said. "I'm not going to complain about nothing."

Excerpted from an article that originally appeared in The New York Times. Reprinted with permission.