Entrusted with the mission of asking for Sparta's aid against the invading Persian forces. The realisation that Sparta would not immediately send any of their fabeled hoplites to the aid of Athens would have caused great consternation for the Athenian messenger.
Heading on his way back towards Athens he faced the grim task of informing his city that they had not better expect any aid from the Lacedominians until nearly another two weeks. The city of Athens expected to be well under a Persian siege by that time.
Heading out of Sparta with the news, Pheidippides would travel back to Athens via the same trek that he used when coming to Sparta.
It was in the precinct of Tegea that Pheidippides claimed to have run into the god Pan, this has always been passed over by modern historians as not relevant and put down to exhaustion.
The main setback against the exhaustion theory is that if the athlete was exhausted while near Tegea to the point of hallucination, how could he possibly compose himself afterwards to make it all the way back to Athens? If an athlete today suffers from exhaustion he is barely able to move in a direct line, and this being well before any hallucination takes place. So if Pheidippides was suffering from exhaustion and hallucination near Tegea it would be a tall ask to have us believe that after the meeting with Pan he composed himself well enough to run a marathon distance back to Athens to deliver a report to which the city's very existence depended. It almost can be compared to a drug addict hallucinating a vision of god but that very day being able to run the distance from Tegea back to Athens. It just doesn't seen likely.
But there may be another explanation that needs further investigation before this meeting can be passed over as to hallucination due to lack of sleep or exhaustion.
What we need to look into is the angle that Pheidippides really did see the god Pan on Mt Parthenon! At first glance this may seem completely incomprehensible. How can a mere mortal have seen a god? Before we go into the explanation we want to make a few points that will be referring back to:
Pan chanced to meet Pheidippides by Mt. Parthenon, which is above Tegea.  The mountain separates Tegea from Hysiae, which is in the precinct of Argos.
Pan was 'calling aloud the name of Pheidippides' . This line implies that the god Pan was calling and probably talking to Pheidippides from a distance, so implying that it was not a face to face conversation. Pan we are assuming was probably high on Mt Parthenon and Pheidippides was at the foot of the mountain. The gods were from Mt Olympus and looking up a mountain to a god would have been a reveared sight to behold.
- One of the facets of Pan was that he represented a version of fear. The word panic is derived from Pan. In mythology when Pan was born the first onlookers who came to see the newborn expecting to see a human looking baby were shocked to see this ugly looking goat child and they ran away in fright. This sudden fear is not just a general fear but more specific. Consider the following story:
A young sheppard who is looking after his sheep on a mountain side plays his lyre while the sheep graze about him. Suddenly, all the sheep stop what they are doing and look up the mountain to a near by group of shrubs and trees. The boy freezes and his eyes begin to strain as he concentrates his gaze upon the wooded area. The sheep wait no longer and all seem to move at the same time with a spring in their step towards the opposite direction and head to the bottom of the mountain. The young sheppard sees movement and waits no more hurrying quickly behind his sheep, calling out to them to move quicker to more safer plains.
This is the fear that Pan represents the unknow fear. The sheppard in the story above moved out of the area because he feared what might be further up the mountain, even though he could not be sure there was anything there. It is not the same fear as being hit in the face by a punch, but of a unknown mischievous variety. In western tradition, something along the lines of the boogyman comes close.
- The city of Argos was the main city-state in the Peloponnese that had given earth and water to the Persian king. Thus they fully gave their blessing in aiding Persia in their intention to invading Greece.
- Pheidippides took the same route back to Athens that he used to get to Sparta. At that area his journey forced him to run at the base of the mountain.
- Pan bade him report to the Athenians.  Thus Pan had a specific message for Athens, he did not have the meeting with Pheidippides for his own personal sake.
- This was not the first time an Athenian had seen one of the Olympian gods, in 561 B.C. some 70+ years before, the city of Athens welcomed back their son Pisistratus who brought with him the goddess Athena, to read that story go to 'A brief history of Athens'.
- During the time of Pheidippides running towards Sparta for their help the city of Athens were having arguments as to whether or not to surrender to the Persians.
The proposition put forward is that Persia had asked Argos to put as much pressure on in the Peloponnese as possible for their interests. The Macedonians kings, claimed their history to the city of Argos, and as Macedonia was under Persian occupancy at the time, the Persians had dealings with the city of Argos directly. The city of Argos knew that a message of some kind would be coming from Athens to Sparta for aid, the Persians also knew of it when they landed at Marathon. Argos had spies on the mountain range that could see which route Pheidippides took to get to Sparta. Then they lay in wait for his inevitable return.
On his return an actor playing the part of Pan came out from behind a rock and bellowed down to the Athenian, by name. In the presence of Pan, Pheidippides dared not advance any further. The message was given, we can assume it was the greatest part that actor ever played. After the message the thankful runner was allowed to be on his way.
If trying all this effort to alter the outcome of the war, why not just have the messenger killed and be done with it? Besides the fact that killing a messenger was seen as a sacrilege in the eyes of the gods and a curse put on the perpetrators, it would not lead to Athens surrendering to the Persians.
So how would that message supposedly lead to the surrender of Athens to Persia?
To start with we have to look at what he reportedly said. Regarding the city of Athens he said 'ask for what reason they had no care of him (Pan), though he was well disposed to the Athenians and had been serviceable to them on many occasions before that time, and would be so also yet again.' 
The meaning of the message is strictly between the city of Athens and Pan; Pan who represents fear. Fear is what the Persians currently represented, Athens was a city in the grips of massive amount of fear. No real help from Sparta, the city verged on the abyss of being annihilated. Why risk being engulfed by the rampaging Persians and loosing out to their greatest fears? Why not be friends with the Persians, and give in to the fear?
This is the real psychological message of Pan; the god of fear is asking Athens not to resist the oncoming inevitable swam that now had landed on their very doorstop, but to surrender to Persia and just give in to the fear and not to resist.
Once the message was delivered to Athens, we would have to assume the forceful personality of Miltiades or the polemarch Kallimachus lead the charge of overcoming the message and dulling its impact.
This is only one theory a hypothetical of what really happened. Some have proposed that the sighting of Pan was actually seen on the way towards Sparta than the trip back to Athens, with a few adjustments the same hypothetical can be made.