Just seven weeks into a nine-month, 39,000-mile ocean sailing race around the world, a Danish team has encountered disaster and abandoned ship.

On Saturday night, during the second leg of the notoriously grueling Volvo Ocean Race, Team Vestas Wind ran aground on a reef off Mauritius, in the Indian Ocean, and broke both of the vessel's rudders. After spending most of the night aboard the damaged $6 million 65-foot yacht, the nine sailors climbed into two life rafts and were picked up by the local coast guard early in the morning. None were injured.

We don’t have any information on what led the team to run aground, but it’s clear that whatever happened, navigating the nine-leg race is as big a challenge as any. The race, which has been held roughly every three years since 1973, was originally called the Whitbread Round the World Race. The seven teams visit six continents, crossing oceans while packed into boats that are built with speed, not comfort, in mind. (Think brutal weather, no fresh food, no shower, one change of clothes, one tiny toilet, and the never-ending pounding of waves.) The race is deadly as well as uncomfortable: In 2006, Dutch sailor Hans Horrevoets died when he was knocked overboard into the North Atlantic. The 65-foot yachts can top 30 knots (35 mph), and each leg takes about three weeks to complete. Distances between teams range widely—after the first leg of this race, from Alicante, Spain to Cape Town, the first and second place boats were 10 minutes apart. Seventh place finished two days later.

At first, each leg seems simple: It’s a race from one city to the next. But the fastest route—and that’s all that matters here—is rarely a straight line because weather and sea conditions are constantly changing. Your course from south to north is never from south to north,” says Ken Read, who twice skippered a team in the race, and is now president of North Sails, a sailmaking company.

Plotting routes is a bit more complicated than mapping your average road trip. Every six hours, each team downloads a big package of weather data from race headquarters (teams are not allowed direct Internet access). With that info and software called the velocity prediction program, which determines speed based on wind conditions, the skipper and navigator chart the course they consider fastest. The standard route “zigzags you all over the ocean, chasing weather, chasing storms, chasing whatever is out there that you can use to your advantage.” If the quickest route takes you through reefs or shallow water, you follow it, Read says. “There’s no such thing as being more careful," he says. "You’re out there to win a race.”

Vestas Wind skipper Chris Nicholson. Brian Carlin/Team Vestas Wind/Volvo Ocean Race

The boats usually survive these risky routes because they’re packed with the best navigation equipment available, along with piles of charts. There are redundant systems, as well—the backup GPS devices have backups, including a battery-powered handheld device if it comes to that. “You should know where you are in the world within five feet, all the time,” Read says. Plotting the routes is such an onerous process, Read had an extra navigator working for him in the two races he captained in 2008-09 and 2011-12. While the crew sailed one leg, an onshore team member would be working on the next leg, compiling copious notes on currents, winds, potential obstacles, and more for every situation the boat could find itself in along the way. He would review all that with the skipper and onboard navigator once they arrived in port. “Yes, you can look at a chart, you can see the stuff’s out there. But you’re tired, you’re sleep-deprived, you’re hungry, you’re worn out and sometime you’re just not thinking clearly. So we wanted such intricate notes as to every section of water on that next leg that we couldn’t screw it up.”

But even with precautions and top equipment, you don’t always know what’s around you. The charts that record things like reefs can be off by up to five miles at some points, says Will Oxley, the navigator for Team Alvimedica. The archipelago where Vestas Wind ran aground (16°32'00.0"S 59°32'00.0"E) isn’t the proverbial uncharted territory, but it’s not particularly well charted, either. Because it’s not on a shipping route, rarely hosts races, and is nearly uninhabited, there’s been little need for detailed mapping. “This is quite new territory,” Oxley says.

Vestas Wind crew members stand in shallow water near their grounded ship. Amory Ross/Team Alvimedica/Volvo Ocean Race

Team Vestas Wind ran aground at night, but navigating in the dark shouldn’t be an issue, Read says, because you don’t steer with your eyes, you steer with instruments like GPS and radar. Still, daylight does of course make it easier to spot reefs, even if they can’t be seen above the water. Oxley, who spent eight years as a marine biologist studying the Great Barrier Reef in his native Australia, says there are visual cues to look for. The water around reefs is warmer than the surrounding ocean water, which tends to form clouds overhead. Those clouds reflect the different color of the shallower water. And when there’s a swell, you can see waves breaking on the submerged coral.

On top of all this, there are the totally unpredictable hazards, including errant shipping containers and the occasional whale. Cruising at more than 30 mph in the black of night, there’s nothing you can do to avoid a collision. All you can do is hope the damage is minimal. “There are risks in sailing,” Oxley says.

So it was lucky for Vestas Wind that Team Alvimedica was nearby when the ship went aground and promptly turned around to lend a hand if necessary. (Team Alvimedica stayed in the area until the coast guard arrived, then resumed racing and will be compensated for lost time.) Doing anything necessary to assist a ship in trouble is, “a fundamental law of the sea,” Oxley says. Read calls it a “code amongst thieves,” who fight bitterly but respect each other. “You’re rivals one day and you’re saving somebody’s life the next.”