Most accounts incorrectly attribute this story to the historian Herodotus, who wrote the history of the Persian Wars in his Histories (composed about 440 BC). In reality, the traditional story appears to be a conflation from several different ancient Greek sources enjoying varying levels of authenticity.
("Fennel-field" is a reference to the Greek word for fennel, marathon, the origin of the name of the battlefield.)
The story is improbable, as the Athenians would more likely have sent the messenger on horseback. However, it may have been possible that they used a runner, as a horse's movements would have been hindered due to the rocky and mountainous terrain of Greece. In any case, no such story appears in Herodotus. The relevant passage of Herodotus (Histories, Book VI, 105...106 [1 ]) is:
The significance of this story is only understood in the light of the legend that the god Pan returned the favor by fighting with the Athenian troops and against the Persians at Marathon. This was important because Pan, in addition to his other powers, had the capacity to instill the most extreme sort of fear, an irrational, blind fear that paralysed the mind and suspended all sense of judgment - panic.
Herodotus was writing about 30 to 40 years after the events he describes, so it is reasonably likely that Pheidippides is a historical figure. If he ran the 246 km over rough roads from Athens to Sparta within two days, it would be an achievement worthy of remembrance. Whether the story is true or not, it has no connection with the Battle of Marathon itself, and Herodotus' silence on the subject of a herald running from Marathon to Athens suggests strongly that no such event occurred.
The first known written account of a run from Marathon to Athens occurs in the works of the Greek writer Plutarch (46-120), in his essay On the Glory of Athens. Plutarch attributes the run to a herald called either Thersippus or Eukles. Lucian, a century later, credits one "Philippides." It seems likely that in the 500 years between Herodotus' time and Plutarch's, the story of Pheidippides had become muddled with that of the Battle of Marathon, and some fanciful writer had invented the story of the run from Marathon to Athens.
While the marathon celebrates the mythical run from Marathon to Athens, since 1982 an annual footrace from Athens to Sparta, known as the Spartathlon, celebrates Pheiddipides' at least semi-historical run across 250 km of Greek countryside.