More than a mile long and consisting of 200 freight cars, Mauritania’s Train du Desert is one of the longest and heaviest trains in the world. Completed in 1963, the train operates daily between Nouadhibou on the Atlantic coast and the iron ore mines in Zouerat, in the middle of the country—a journey of around 450 miles that takes about 13 hours each way. Although its primary purpose is to transport ore from the mines, from the beginning Mauritanians have hopped rides on the freight cars to reach remote desert settlements.

Australian photographer Adrian Guerin began dreaming of taking a ride on the train following his first visit to Mauritania in 2015. After years of research and planning, he finally made the trip last June. Although other adventurous travelers had made the journey before, Guerin decided to challenge himself by doing it alone, at the hottest time of the year, when temperatures regularly reach 120 degrees Fahrenheit during the day.

“I knew it would be difficult, but nothing had prepared me for 120 degrees,” Guerin says. “It’s the hardest thing I’ve ever done.”

After waiting 10 hours at the train station—schedules are practically nonexistent in Mauritania—the photographer boarded the train in Nouadhibou with four large jugs of water, food, his camera equipment, and protective gear. Although there was a crowded passenger carriage, Guerin, like most Mauritanians, opted to ride in one of the open-air freight cars, which are empty on the journey east. On the outward leg he shared a car with a family that had installed a rug, cook stove, cupboards, and bedding in their otherwise empty car. Because there wasn’t a toilet, passengers urinated into a pile of sand in the corner of the carriage.

The Train du Desert is so long that every time the locomotive slows down, each of the carriages slams into the one in front, throwing everything and everyone forward. The first time this happened, Guerin assumed the train had derailed. Although he eventually grew accustomed to these unexpected collisions, he understood why some people have died trying to switch cars while the train is in motion.

After spending a cold night on the train, Guerin disembarked at the town of Choum, where he caught a van to a guest house to rest for a few hours before returning to catch the same train on its way back. Now all the freight cars were filled to the top with sooty iron ore, giving Guerin no choice but to climb on top for the ride home. “I kind of burrowed down in the ore and made a little corner for myself,” he recalls. “I got rid of all the big rocks, put down a mat, and made it as comfortable as possible for myself.”

As unpleasant as the outbound journey had been, it now seemed to Guerin like a ride on the Orient Express compared with the experience of traversing the desert atop a slag heap. He put on protective goggles and a headscarf, but iron dust still got into every pore and crevice of his body. As the sun climbed in the sky and the temperature soared, Guerin began to question his decisions. “What sort of fucking idiot rides a Saharan freight train in June for fun?” he remembers thinking.

But it was on the miserable return journey that Guerin took many of his best shots, including the image that recently won the 2020 Sony World Photography Award for best travel photograph. These days, self-isolating at home in Melbourne, Guerin wonders how long it will be until he can embark on another crazy adventure. He also notes that the experience gave him a new appreciation for people’s resilience and generosity.

“Some of the poorest people in the world invited me into their freight cars. They fed me. They always ensured I had enough water. They put their arms around me. They looked out for me. And they did it without platitudes and without fanfare.”

The experience also prompted Guerin to make a resolution: He would never complain about waiting for a train again.

5:44 pm 04/27/20: A previous version of this article incorrectly stated that passengers urinated into plastic bottles that they littered across the desert.

More Great WIRED Stories