Five years ago today, Hurricane Wilma ripped across Florida and into the record books as the third costliest storm in U.S. history, and the most damaging hurricane ever to strike Broward and Palm Beach counties.

Tens of thousands of South Floridians lost electricity, schools and businesses were shut down for days, gas lines were blocks long and destruction was so widespread that many roofs have yet to be repaired.

Wilma spurred the state and many South Florida communities to better prepare for the next disaster. New state and local laws call for back-up generators to power water treatment plants and gas stations, tighter building codes and improvements to emergency shelters and warning systems.

In Cooper City, commissioners even passed an ordinance that allows the temporary appropriation of private boats and chain saws if needed to save lives. "With a natural disaster, who knows?" said Cooper City Mayor Debby Eisinger. "I can't guarantee we won't lose electricity. But I'm confident we're better prepared."

Wilma's final toll: five dead in Florida, $20 billion in damage, and a haunting awareness that even a mid-size hurricane can cause enduring disruption.

"We still haven't recovered, financially or emotionally," said Sandra Nelson, 36, president of one of four homeowners' associations at the hard-hit Stonebridge Gardens, a condominium complex in Lauderhill that is pockmarked with vacancies and foreclosures and may be teetering toward receivership.

In Palm Beach County, the higher-income residents of Huntington Lakes, a senior community west of Delray Beach, are faring a little better. After years of legal wrangling and special assessments, they have money in the bank.

But final repairs to 41 Huntington Lakes roofs damaged by Wilma began only this month, and only after a $6.8 million settlement from insurance carriers.

"Wilma left us with a lot of chaos," said condominium association president Walter Peller, 96. "We are coping pretty well, but it's an ongoing job."

In the aftermath of the storm, thousands of homes in Broward and Palm Beach counties were covered with blue tarps, stalks of sugar cane in fields near Lake Okeechobee were flattened, and the streets of downtown Fort Lauderdale were littered with glass. Among the buildings made instantly uninhabitable when the windows blew out were the 14-story Broward School Board's building, called the Crystal Palace, and the county courthouse.

"Wilma really woke people up to fact that a hurricane that's a direct hit doesn't have to be real severe to cause problems, especially if you lose electricity," said Tony Carper, who was Broward County's emergency management director at the time.

"We were at the end of hurricane season, and everyone was tired," he said. "There had been so much activity in 2004 [with Hurricanes Frances and Jeanne], and many people here had been to New Orleans to help with Katrina. So people had just about had it."

Statewide, the Legislature earmarked $52.8 million to install emergency power generators in special needs shelters, including three schools in Broward County: Sunset School in Fort Lauderdale; McNicoll Middle School in Hollywood, and Davie's Indian Ridge Middle School.

Another $45 million was set aside for new county emergency operation center construction.

In Broward, Palm Beach and Miami-Dade counties, more than 60 gas stations located within a half-mile of an interstate highway or evacuation route are required to have back-up generators. And many more stores — including gas stations and grocery stores in that display the "Hurricane Ready" decal — are prepared to stay powered up if power is lost.

The state's largest utility, Florida Power & Light, has spent $623 million since Wilma to protect the power grid, trimming trees along 47,000 miles of power lines, inspecting a half-million utility poles and upgrading equipment near every major hospital. Irene White, FPL's senior director of customer support, stopped short of saying there would be no outages when the next storm hits. But, she said, "Do I feel good work has been done? Absolutely."

The state's Department of Transportation, working with counties, have storm-proofed thousands of intersections by replacing hanging signals with more sturdy mast arms. "After Wilma, there was not a functioning traffic light in Broward County," said Carper, now retired. "Traffic is usually bad here, but that was a nightmare."

Wireless companies have.erected hundreds of new towers since Wilma to handle capacity increases.

The storm also took out tens of thousands of trees in South Florida, including those critical to providing shade. "We lost so many trees," said Carol Morgenstern, a spokeswoman for the Broward Parks and Recreation Department, "especially those without strong root system."