It drove terror deep into Mexico, smashing ashore as the third most powerful Atlantic hurricane ever to hit land.

But the furious beast proved relatively toothless, thanks to large-scale preparations — and a lot of luck.

Hurricane Dean did kill at least eight people in Mexico. It also destroyed sugar cane, corn crops and mango orchards and demolished a major cruise ship port. Insured losses were estimated to be less than $300 million.

Still, things could have been far worse.

The fast-moving hurricane first punched the Yucatan Peninsula as a Category 5 storm, and many feared catastrophe for one of Mexico's poorest regions. It later spun through the heart of Mexico's offshore oil industry in the Gulf of Mexico and slammed into the mainland coast.

But luckily, Dean missed all major cities, tearing through areas of tiny villages, farmland and forest. It didn't linger like more damaging storms, and by the time it hit key oil platforms and ports, Dean had weakened.

It also helped that people heeded the government's warnings, which were issued in Spanish and in Mayan languages: At least 18,000 fled to government shelters before the storm hit. Tourism officials also got organized, evacuating more than 50,000 tourists from Cancun and the Riviera Maya.

Soldiers escorted all but a stubborn few out of Majahual, a village with a huge concrete pier that 1 million cruise ship passengers per year recognize as the Puerto Costa Maya stop on their itineraries.

The eye of the hurricane passed directly over Majahual, and it turned out to be the only town that suffered catastrophic damage. Sustained winds of 165 mph and a powerful storm surge demolished hundreds of houses, crumpled steel girders, splintered wooden structures and washed away huge sections of the pier.

Mexican Economy Secretary Eduardo Sojo estimated Thursday that it would take six months to repair the Majahual port, but Carnival Corp. said it's not clear when Costa Maya might come back.

In the past, few would leave their homes or stores for fear of looting. Now people realize hurricanes pose the greater danger after seeing Wilma ravage Cancun in 2005 and Mitch kill nearly 11,000 in neighboring Central America in 1998.

"We have become more aware of these phenomena," said Joel Cruz, 30, a shopkeeper in Poza Rica, an oil city on the Gulf coast of Veracruz near where Dean made its second landfall. "Before we would wait until the last minute before moving a finger."

Mexico's state-owned oil monopoly Petroleos Mexicanos said Thursday it has resumed offshore oil and gas production in the southern Gulf of Mexico after determining Hurricane Dean's damage was minimal. The company also reopened two of Mexico's three main oil-exporting ports in the southern Gulf of Mexico.

Beatriz Hernandez, 31, said that people in 1999 ignored warnings before heavy rains prompted floods that killed 350, destroyed tens of thousands of homes and damaged the pre-Hispanic ruins at Tajin in Veracruz.

"Now we know that when they say it's going to be bad, that it really is bad," said Hernandez, watching as men removed the mango and avocado trees knocked over by Dean's winds, which also ripped the roof off her Poza Rica home. Hernandez had fled to a friend's more sturdier home beforehand.

President Felipe Calderon said in Veracruz on Thursday that "we Mexicans can feel — if not satisfied — motivated" because the response by officials and residents saved lives and minimized damage.

Outsiders are taking interest in Mexico's hurricane preparations and reconstruction efforts.

State Treasurer John Kennedy of Louisiana, a state devastated by Hurricane Katrina in 2005, flew to Mexico in January to study how Cancun bounced back so quickly as a top resort. The city of 526,000 completed 90 percent of its rebirth only a year after Wilma destroyed it and caused $3 billion in losses.

"More than anything else, it's about being prepared," said Jorge Acevedo, a spokesman for Quintana Roo state, where Cancun is located. He noted that the state governor had ordered the evacuation of some islands and hotels while Dean was still days away in the Caribbean.

Thousands of Maya Indians lost their thatch-roofed homes as Dean blew through their isolated communities, far south of the glitzy tourist resorts. These Maya also lost the innumerable fruit trees they depend on to live. Some said no other hurricane had hit them so hard.

But overall, Mexico fared well.

Alvaro Sosa, a resident of Felipe Carrillo Puerto, said as "frequent customers of the hurricanes," Mexico is quickly becoming an expert nation.

Others credited a higher power.

"God is great and spared us," said Jorge Armando Ramirez, 28, an elementary school teacher. "But horrible things could have happened."