We’ve all seen these situations in movies and TV shows: a car plunges into a lake after a high-speed chase and the people inside barely escape before the car completely sinks. Getting out of a car that falls into a body of water may seem pretty straightforward, but sometimes people panic and don’t make it out alive. Here are some life-saving methods to escape a flooded car.

Try not to panic

It’s obviously the easiest advice to give and the hardest to follow, but keeping it in mind may be the difference between life and death. Losing your cool does two things that will sabotage all attempts you make to save your life. First of all, your mind stops working properly in panic situations. You enter “fight or flight” mode, except there’s no one to fight and nowhere to flee. The second reason why keeping your cool is absolutely crucial is the simple fact that when you freak out you lose precious oxygen and energy that you may desperately need in the following minutes.

As with any unexpected high-pressure situation, it’s best to train your mind in advance and make sure you expect the unexpected. Once you have mastered that, once a situation like this occurs, you will instinctively concentrate all your mental powers on what you need to do to survive.

On the other hand, you don’t want to be too calm either. Many people died because they calmly waited for the car to get completely filled with water, thinking that once they’re fully submerged they could just open the door. But the physics of it isn’t that simple. It takes a while for the inside pressure to equalize with the outside pressure and you don’t have that kind of time.

Act fast and decisive

Research shows that your best odds of escaping a sinking car are within the first three minutes, as most cars won’t go down immediately and float around for 30-120 seconds after they’ve hit the water. If you managed to master step 1 and keep your cool, you and your passengers can all escape in under a minute if you know what to do.

The first thing you need to do is to remove your seatbelt. It’s useless at this point and it will give you enough flexibility to get the job done. Also, unless you have great reflexes and manage to open it until the instant you hit the water, you should forget about opening the door. After that moment, even the slightest water pressure applied on the door will make it almost impossible to open. Even if you do, the car will instantly fill with water and your passengers may be trapped inside as the car quickly sinks. So opening the door is a solution only if you somehow manage to open it before actually hitting the water and you’re the only person in the car.

The best way to escape a sinking car is making your way out through the side window. The first thing you should do is try to roll it down, as the electric wires powering it are usually well-insulated enough to still work for a few seconds after the impact with the water. This is the best-case scenario: you hit the water, immediately open the window as the car still floats, and then you and your passengers can escape and swim to shore.

Break your way out

But what about situations when the window won’t roll? Well, you’ll obviously have to break it somehow. The windshield may seem easier to break, but most of them have a protective plastic sheet that will prevent you from escaping, so the side window is still your best bet, despite it being pretty hard to crack. If you’re a very strong man you can punch your way out, but for 99.9% of the general population that’s not really an option, as those side windows are built to last. So what you should do is to try and find a hard object inside your car. If you happen to have a hammer or a baseball bat close by you’re in luck, but if not, don’t panic. There’s a useful tool at your disposal that you may have not thought about: the headrest. The vast majority of headrests can be completely pulled out and have two solid metal bars that you can use.

There’s probably a mechanism that allows you to completely remove the headrest, so the next time you’re in your car it may be a good idea to see exactly how it’s done, as it will save you precious moments in a time of need. Once it’s out, you can start hitting your window because your life actually depends on it. Your best bet is not the center of the window, but one of its sides. If you’re lacking the strength and still can’t break it, try to use one of the headrest bars as a lever by sticking it between the window and the door and pulling down.

Once you’ve cracked the window, just make your way out along with anybody else that may be in the car and swim to shore. Be aware that there’s a big possibility that the car will be flooded the instant you break the window, but as long as you don’t panic and fight through it you should still be able to safely get away.