Humpback whales can swim as far as 3,700 miles (5,955 kilometers) for the chance to mate, per a new study.

Scientists analyzed a database of over 450,000 pictures of whales in the wild to track the animals. They found that some would swim thousands of miles during the mating season.

Two distinctive males, which could be recognized by markings on their tails, were recorded in two popular mating grounds less than two months apart.

The first was off the western coast of Mexico, and the second was near Hawaii, a distance of around 3,700 miles (5,955 kilometers).

WhaleBreachingUnderRainbowWhale journey from Mexico to Hawaii in less than two months. (Google Maps/Insider)

The timing suggests the whales swam faster than their typical cruising speed of 2.5 miles (5 kilometers) per hour to get there.

"Our first reaction was, 'You've got to be kidding me!'" James Darling of the Whale Trust Maui in Hawaii and an author on the study told the New Scientist magazine.

"They might just be traveling the ocean like it's their own backyard," he said.

The findings were published in the peer-reviewed journal Biology Letters on Wednesday.

Humpback whales in the North Pacific tend to spend their summers around Canada and Alaska before relocating to mating grounds near Mexico and Hawaii in the winter.

They do not mate for life and females are thought to look for a new partner every breeding season.

WhaleBreachingUnderRainbowA humpback whale breaches under a rainbow in Maui, Hawaii. (share your experiences/Getty Images)

Scientists previously assumed they would choose one mating site. But, thanks to the distinctive tail markings, the scientists saw that one male traveled 2,824 miles (4,545km) from Maui, Hawaii, to the Revillagigedo Archipelago of Mexico between 23 February and 17 April 2006.

The second made the opposite journey, from Guerrero, Mexico, to Maui between 16 February and April 5 in 2018, a journey that is 3,693 miles (5,944 km) long.

He was one of seven males to pursue a single female there, New Scientist said.

There's no reason to think females would not do the same, Darling told the outlet.

This article was originally published by Business Insider.

More from Business Insider: