The history is not complete for sure. But the significance of Masjid Al-Aqsa in Islam is undeniable and they are connected by an intimate bond, though there has been recent insinuate to the contrary even by some Muslims.
Glory to (Allah) Who did take His Servant for a Journey by night
from the Sacred Mosque to the Farthest Mosque,
whose precincts We did bless,
- in order that We might show him some of Our Signs:
for He is the One Who heareth and seeth (all things). [Qur'‚n 17:1]
The Masjid Al-Aqsa was called a MASJID (mosque) in the Holy Quran, quite a while before it came to be known as one. At the time it was known as Baitul-Aqsa. At the time when these verses were revealed, the area was reviled by the christians who inhabited Jerusalem as the place where the jews had worshiped before, an object of Hatred. The christians of the time would throw their garbage, menstruation blood, and other filth at the site to show their disgust! The jews of course were no where near Jerusalem at the time. Why would the prophet go to such a place to lead the prayers for a congregation of all the prophets before him, before 'ascending' to the heavens is unexplicable unless we take into the consideration the fact that regardless of what was happening at the time at the place, Allah had the made place special for all the Muslims.
When the army of Umar reached the gates of Jerusalem. They laid seige to the city. The christian head priest would surrender to the Muslim Commander, saying that he will only surrender to a man whose name had 3 alphabet roots (if you know about Arabic language you will know what I am talking about!) and it turned out the man he was supposed to surrender to was Umar (the caliph) who was based some 450 miles away! Don't ask me how the priest knew about this man Umar...I think it has something to do with astronomy and some other future-telling stuff! Anyways the General wrote back to Umar, letting him know about the impasse. He said that it was basically Umar's choice. The Muslims had enough firepower to break through but that would lead to a lot of bloodshed. So if Umar came, they could capture the city peacefully. Umar of course decided to make the long journey coz he knew that as a Muslim it was duty to do all he could even to save one innocent life. So Umar made the journey along with one servant and a camel. The journey itself is often quoted to show Umar's simplicity, fairness and humility. Umar and his servant decided that each will ride one third of the way, while the camel will be on its own the other third! As they approached the city, it was the servant's turn on the camel, and Umar didn't even ask him to change positions for the sake of appearances! Anyways, to cut the long story short, Umar was thoroughly inspected by the head priest who even counted the number of patches on his garments to make sure this is the man he was supposed to hand over control to. Anyways they signed some treaty allowing lives to go on with out disruptions, and despite vehement protests from the Christian priest, Umar decided to let Jews to come and visit the holy places!
To make the long story short, Muslims have had a lot of history to do with this city and Masjid Al-Aqsa. The fate of the Muslims and their state seems to be positively correlated with that of Al-Aqsa. Their best periods seems to be when they were in control of the place.
[Edited on 4-10-2003 by pompous]