It’s quiet on the bridge. The stars rotate over your head slowly, descending to the western horizon as you walk around the bridge, checking the radar as you pass it, looking at the speed logs to make sure everything is as it should be. You exchange a few jokes and sea stories with the deckhand on watch, called an “AB,” or able-bodied seaman, in the world of big ships.

Suddenly, an alarm begins buzzing. You look at the panel just as the telephone rings. The AB grabs the phone up off its hook as you stare fearfully at the blinking red light: the main engine is over-speeding. The engineer has gone to bed, but the alarm panel in his room is no doubt giving him the same warning. In fact, that’s him on the phone, wondering what’s going on. You hit the emergency shutdown and order the AB to call the captain.

It’s worse than you could have imagined.

A fire is raging through the engine room, fueled by a sprung hydraulic line. The fluid is an explosive mist pouring into the machinery space, causing the flaming gases to fly uncontrollably throughout the compartment. The rush of air forces the engines to faster and faster speeds, which is pumping the hydraulic mist into the engine room more and more, making the whole cycle unstoppable.

You can’t shut the engines down because the automatic shutoff valves to the fuel are not working. To make matters worse, the ladder-way into the engine room creates a chimney effect, which means that the air at the ladder is too hot for even a firefighter to enter.

This is a paraphrasing of a real incident that occurred on board a vessel, and it happened in Maine. The case is cited in the January 2015 issue of Workboat Magazine. It provides an example of a situation that nobody was prepared for. But being safe at sea is the most important issue for any sailor—and fires are the deadliest calamities on ships. The definition of good seamanship is “a safe and timely arrival.” The safe part comes first for a reason.

When I worked on the tugs at Western Towboat in the Pacific Northwest, we discussed the contingency plan for several situations. For instance, what happens if a man falls overboard? With a half mile of cable and barge behind the boat, you can’t just turn around and get him. On a big ship, it can take miles to turn around and even begin searching for a man overboard. The height above the water of most modern super-tankers and containerships is so great that the fall would kill a sailor immediately.

At Maine Maritime Academy, the juniors of the Vessel Operations and Technology program study workboat operations, in which they practice hands-on scenarios that could happen at any time on a vessel. Capt. John Worth emphasizes that nobody can prepare for every situation. Therefore, two things are necessary: a very good safety brief, in which the captain and mate discuss reactions to situations, and a clear chain of command, so that if something unexpected does happen, a clear sequence of orders can be sent and carried out in an orderly fashion. The students practice this on the academy’s tug Pentagoet, taking turns in the role of master, mate, engineer and deckhand. Every one of us learns the proper operation of the vessel, where all the safety gear is, and how to react to different situations. Then, the acting captain will give a safety brief to the crew, describing the plan and how he or she expects the crew to react and handle the situation. This process is key to good safety at sea.

The ocean is dangerous. There is nobody out there to help you if something goes wrong. But good training and solid planning go a long way to being safer on the water, and coming home to a safe port.

Benjamin Stevens of Islesford is a student at Maine Maritime Academy in Castine.