It had the biggest bite of any whale and were it not for the fact that it went extinct millions of years before the fabled Moby Dick, there is little doubt that it would have made Captain Ahab turn in his watery grave.

The fossilised remains of an extinct sperm whale with teeth each more than a foot long has been unearthed in Peru by scientists who believe the great predator ate other whales to survive.

The new species has been named Leviathan melvillei after the Hebrew word Livyatan, meaning a large, mythical sea monster, and in honour of the American novelist Herman Melville, author of The Whale, also known as Moby Dick.

When Melville wrote his classic tale of 19th-century whaling he had been influenced by the true story of a massive male sperm whale that had rammed and destroyed a whaling boat. (The fictional Captain Ahab held a grudge against a white sperm whale that had sunk his ship and bitten off his leg.)

But the Leviathan unearthed in Peru would have been an even deadlier foe than the squid-eating Moby Dick, given that its teeth were the size of elephant tusks and its jaws were designed for biting and gripping large baleen whales that lived off drifting plankton.

"This new sperm whale likely had a body length in the range of the living sperm whale Physeter macrocephalus, which is the largest-known toothed whale," said Olivier Lambert of the National Natural History Museum in Paris. "So Leviathan is not the biggest whale feeding on large prey, but it has the largest teeth, and possibly the most powerful bite. With such large teeth on upper and lower jaws, robust mandible and vast area of origin for jaw muscles, we think Leviathan was able to feed on large prey."

The most obvious candidates for the whale's diet were the large, blubbery baleen whales that existed at the same tim, some 12 to 13 million years ago, added Dr Lambert, the lead author of the study describing the extinct sperm whale published in the journal Nature.

"The most common large vertebrates where Leviathan was found were baleen whales. With their thick layer of blubber and their size, baleen whales have a very high energetic content, and could be an interesting prey for this sperm whale," he said.

The researchers have so far found only the fossilised three-metre-long skull with upper and lower jaws complete with several of the distinctive long teeth. They estimate that Leviathan grew to between 13 and 18 metres long, about the size of modern sperm whales.

However, whereas sperm whales today have relatively small teeth and capture squid by sucking them into their mouths, the ancient animal was armed with gigantic teeth 12cm in diameter and 36cm long.

The specimen was found by Klaas Post of the Natural History Museum in Rotterdam on the last day of a November 2008 field trip exploring the Peruvian coastal desert region of Pisco-Ica. The region is rich in the fossils of marine animals such as ancient dolphins, porpoises, seals, turtles and fish, Dr Lambert said.

"He was taking measurements on fossil baleen whales, which are very numerous in this locality. He saw a giant skull with teeth on the upper jaw, and realised that it was a large sperm whale. Nowadays, only some populations of the killer whale hunt baleen whales. The killer whales attack baleen whales cooperatively, but killer whales are much smaller than Leviathan and baleen whales were smaller at that time than most living species, so maybe Leviathan was able to catch whales alone," he added.