OK, there is so much disinformation on this site, I decided to spend some time ACTUALLY RESEARCHING this topic. The following comes from multiple sources, including Department of Health and Human Performance, University of Montana, marathonguide.com, time-to-run.com, therunningcenter.com, University of Brussels Department of Classics, etc. Most of these accounts were very similar with, especially in regard to distances, dates, and so on, so I think this should be quite accurate. While the legend of Phidippides is merely that - a legend, this is a summary of what multiple sources on the subject say:
In 490 B.C., Athenian troops defeated a large Persian invasion force on the plain of Marathon, about 35km from Athens.
According to Herodotus, the Athenians sent Phidippides to request help from the Spartans. He ran nonstop for two days to cover the 200km. Then, in about 300 B.C., the philosopher Pontikos told the story of a solder named Thersippos who ran the 35km from Marathon to Athens to announce the victory and died after making the announcement from exhaustion.
It wasn't until about 100 A.D. that a writer by the name of Lucianus told the legend that Phidippides had been sent to Athens to bring news of the victory at Marathon. After reaching the city, he said, "Rejoice, we conquer," and then collapsed and died. So, it was a combination of the two stories.
Then, in the early 1890s, French historian Michele Breal proposed re-enacting Phidippides' legendary run for the inaugural Olympic Games in Athens in 1896 with the winner to receive a silver chalice.
The creator of the modern Olympics, Baron Pierre de Coubertin, liked the idea so a 40-kilometer (24.8-mile) race called the marathon was planned as the last event of the 1896 games.
The first Olympic marathon was run on April 10, 1896, which was won by Spiridon Louis, a Greek. Because a Greek won the crowning event of the Games, it became the biggest story, so officials of the Boston Athletic Association, which financed the American athletes' trip to Athens, created the Boston Marathon the following year, at a distance of 24.5 miles.
The current official marathon distance of 26 miles, 385 yards was established at the 1908 Olympics in London. The course was originally laid out to be 26 miles long from Windsor Castle to the Olympic stadium. However, 385 yards was added so it would finish in front of King Edward VII's box. Races of varying distances were run in the following years, including the 24.5-mile Boston Marathon until 1924, when Olympic officials formally adopted the distance of 42,195 meters (26 miles, 385 yards) as official. Boston changed its course in 1924 to the new standard, but had to change it again in 1927 because it was discovered that the 1924 course was about 150 meters short.
Except for a few sporadic races, the Boston Marathon and Olympic Marathons were the only regularly-scheduled marathons until the 1950s, when some others started being annually run in Europe.
It wasn't until 1970 with the establishment of the New York Marathon, that other annual marathons started to become more popular throughout Europe and Asia. Regularly scheduled marathons in the United States became more popular after Frank Shorter's gold medal in the 1972 games.