CNN  — 

A 6.4-magnitude earthquake struck Southern California on Thursday, triggering a state of emergency in the desert town of Ridgecrest, and leaving people from Los Angeles to Las Vegas feeling shaken.

It’s the largest tremblor to strike the region in 20 years, officials said.

The earthquake struck in a sparsely populated area, and reports of damage were not extensive. But it reminded residents across the region that they need to be prepared in case a quake hits closer to home.

Here’s what to do before, during and after an earthquake, according to the Department of Homeland Security, Earthquake Country Alliance and Red Cross.

Before it strikes

Have a plan: Earthquakes strike without warning, so identify spots in your home ahead of time where you can safely wait them out – think away from windows and overhead objects.

Prep your home: Secure items that could slide or fall, like televisions or bookshelves, with straps, and keep them away from your designated safe space. Store heavy and fragile objects on lower shelves where they won’t cause damage.

Set an emergency contact: Designate an out-of-area contact who can relay information between family members.

Pick a spot where you’ll meet afterward: If you’re separated, pick a clear location that will be safe from debris and damage where you can meet when the earthquake ends.

Practice: Even if it seems silly, perform drop, cover and hold on drills: drop down on all fours, cover your head and neck, and crawl under a sturdy desk or table. In the event of a quake, you’ll need to take cover and hold onto the furniture until the shaking stops.

Make a kit: Gather nonperishable foods, bottled water (at least three gallons per person), first aid supplies, portable phone chargers that are charged themselves, and other essentials you’ll need for at least 72 hours. It’s better to have too much than too little.

Get an extinguisher: Earthquakes can down wires and start fires, so make sure you have an extinguisher handy and know how to use one.

Fuel up: Keep your gas tank close to full in case of a power outage, but don’t drive in the middle of an earthquake.

Consider a retrofit: Check out your home with a foundation specialist to see if you need additional reinforcements. The investment could save you thousands in damages.

When the ground starts shaking

Drop, cover and hold on: Try to avoid moving too much; if the quake is severe, it’ll likely knock you to the ground.

Avoid windows: Flying objects could break through the glass and cause harm, so keep away.

Stay where you are: If you’re in bed, stay there, but cover your face and neck with a pillow. If you’re inside, don’t run outside – parts of the building’s exterior could fall from overhead. If you’re driving, stop your vehicle in an area clear of trees, buildings, overpasses or wires.

Don’t take the elevator: Even if the power isn’t out, the elevator could stop working if quakes continue. It’s best to stay put, then take the stairs when it’s safe to move.

After the first quake

Wait out the aftershocks: Quakes of smaller magnitude nearly always follow the most severe shocks of an earthquake sequence, so be aware in the hours following the initial earthquake.

Get out: If you’re in a damaged building, get outside and move far away to avoid falling debris.

If you’re stuck, close your mouth: You could inhale fumes or debris, so it’s best to send a text, bang on a nearby object or whistle so rescuers can locate you.

Monitor the news: The government will likely alert the public with emergency instructions via TV, social media and radio, so look to your devices for updates.

Avoid making phone calls: Call volume has exceeded the capacity of mobile carriers’ networks after earthquakes in the past, so some calls were blocked to allow others. It’s best not to call unless it’s an emergency, so text or instant message instead.