When I was in the Navy, it was my job to push the button. I was a fire controlman and I worked on multiple weapons systems across several classes of ship, including as an AEGIS weapon system supervisor aboard a U.S. Navy Cruiser. I also spent time as an instructor, training young sailors in the applications of force as well as the operations and maintenance of the Mark 92 Fire Control System. This week, the USS Mason was attacked two separate times, with two missiles each time — once on Sunday and then again on Wednesday — the anniversary of the bombing of the USS Cole, which was attacked when in port taking on food, stores, and fuel in Yemen in 2000. The next day, the USS Nitze fired three Tomahawk missiles in retaliatory strikes at radar sites in Houthi-controlled territory within Yemen.

Without getting into the geopolitical situation, or disclosing any classified tactics, techniques, and procedures, let’s talk about what happens aboard a U.S. Navy warship when something like that happens.

Missiles come in all shapes, sizes, and speeds. The response weapon changes with the variables. The missiles fired at Mason were likely a variant of the C-802, a Chinese missile with the NATO designation “Saccade,” widely used by Iranians. Most of the Saccade missiles are subsonic, meaning they travel below the speed of sound. They generally fly about 10–20 meters off the surface until the final stage of flight when they drop down to three-to-seven meters off the surface of the ocean. Flying so low during all stages of flight make the Saccade a sea-skimming missile, designed to make it very difficult to detect.

Modern U.S. destroyers and cruisers employ the Aegis Weapon System. The AWS was created in the 1970s and remains one of the most capable and advanced weapons systems in the world. In fact, the system kicks so much ass that people refer to the ships that use them as Aegis destroyers and Aegis cruisers.

Related: This Is What Led To The US Navy Launching Missiles Into Yemen »

So what happens when some bad actor fires a missile at a warship that’s just minding its own business and maintaining freedom of the seas for the world?

Step one: Missile inbound.

Someone in the combat information center will notice a very swiftly moving contact on the radar screen. Missiles, in general, are easy to spot because they move faster than anything else. A slow missile may look like an aircraft, but various indicators generally give them away. The first person to detect the missile will yell out, “VAMPIRE INBOUND!” along with some proprietary Navy information to make sure folks know the situation.

Step two: Confirm it’s a missile.

The ship has onboard sensors along with any information from units in and around the area of operations. These sensors range from passive to active, which means some just listen and others actively broadcast to look. It’s like the difference between having night vision that no one can see you using, and turning on some really bright stadium lights to light up the area. Sailors in the combat information center will confirm that it’s a missile and not a radar anomaly or some other phenomena.

Step three: shoot that vampire down.

Once we’ve confirmed that an anti-ship missile is headed toward the ship, it’s time to take action. Sailors from Combat Fire Control division are responsible for the operations and maintenance of the weapons systems and will likely be the ones taking action. Each class of ship has multiple close, medium, and long-range weapons and countermeasures to address the threat. In the case of the Mason, they used Standard Missile 2 (SM-2) and Enhanced Sea Sparrow Missiles to “splash” the missiles. The SM-2 and ESSM are medium range missiles stored in the ship’s Vertical Launch System cells, along with Tomahawks and other weapon systems. ESSMs are unique in that each VLS cell can hold 4 of the missiles, meaning Navy ships can hold several to protect themselves or the units around them.

U.S. Navy photo.

Destroyers photo

If the missiles made it through those defenses, or were fired closer, the shipboard Phalanx Close-In Weapons System — also known as the CIWS (pronounced “sea-wiz”) — would engage it. The CIWS looks like a really excited R2-D2 and terrifies helicopter pilots all over the Navy, and for good reason. CIWS shoots upwards of 4,500 rounds per minute, creating a wall of tungsten in front of an incoming contact, and can be operated fully autonomously. When all of the weapons and countermeasure systems are combined, a U.S. Navy warship is basically Skynet.

Step four: Maintain readiness and evaluate further action.

Okay, so the warship has shot down a couple of incoming missiles and everyone is on high alert. The folks who were watching movies, sleeping, eating, or otherwise engaged heard the weapons systems being employed and hauled ass to their respective command and control stations to find out the latest info on the situation. The engineering team will ensure that all systems are online and that peak readiness is achieved. The commanding officer and executive officer are split between the combat information center and the pilot house, ready to continue the fight. The whole ship is ready and are hoping for a shot at lobbing the retaliatory Tomahawk missiles at whatever targets fit the appropriate response.

The idea that rebel groups are attacking warships with our friends and family may sound alarming, but the good news is that these ships, and the sailors aboard them, are ready, willing, and able to handle the threat. U.S. Navy warships train for various scenarios, many of which include the prospect of incoming missiles. In fact, these incidents show that the weapons systems aboard our warships work as designed and that our sailors are well-trained.