and Allah said "And proclaim the pilgramage among men; they will come to thee on foot and on every kind of camel. Lean on account of Journeys through deep and distant mountain highways" Surah 22 ~ Al Hajj Part 27
How did Salaah come about?
One night a year before migrating from Makkah to Medina (Hijra) in 622 AD, Angel Jibreal (Gabriel) came to Muhammad (pbuh) while he slept. Jibreal (Gabriel) opened the prophets chest and removed his heart which he washed with ZamZam water. Jibreal (Gabriel) replaced the heart and emptied a gold vessel containing wisdom and faith in to the chest of the prophet. Jibreal (Gabriel) than took the prophet to the gates of the Ka'bah.
There the prophet saw a white creature, smaller than a mule but larger than a donkey wings on each side of its hind legs. The prophet mounted it and they took off north to Bayt Al-Magdis in Jerusalem.
This part of the journey is called Al-Isra'a.
"Glory be to him (Allah) who took his slave (Muhammad pbuh) from Al-Haram mosque (Makkah) to Al-Aqsa mosque (Jerusalem) whose vicinity we have blessed in order that we might show him (Muhammad) some of our signs. Surely he is the All-Nearer, the All-Seer" Chapter 17 Bani - Israel Verse 1
At the Al-Aqsa Mosque the prophet prayed two rakats and also saw Musa (Moses), Eisah (Jesus) and Ibrahim (Abraham) and all the prophets for whom Muhammad (pbuh) was instructed to lead them in prayer, it should be noted that it is not known if all the prophets and messangers were present in body or in soul except for Eisah who was there in body for muslims have been told that Eisah was taken by Allah without dying.
There after the prophet ascended. This accession is known as Al-Mi'raj.
Jibreal (Gabriel)) led the prophet to a Lote Tree. Here Allah spoke to Muhammad directly and revealed the last verses of Surah Al-Baqarah. It is during this miraculous journet that Allah made daily prayers (Salaah) compulsory to all believers. Allah prescribed fifty daily prayers. Muhammad descended to the Sixth heaven and Musa (Moses) asked Muhammad what acts of worship had Allah prescribed. Muhammad told him and Moses said "Your people will not be able to perform 50 daily prayers. I tried the people before you as I had to deal with the Children of Israel and it was very difficult for me, Go back and ask your Lord to reduce the burden on your people"
The Prophet did so and Allah reduced the prayers by ten. Again upon descent Musa (Moses) suggested that Muhammad return and request a further reduction for the same reasons. Again Muhammad returned and continued to go back and forth between Allah and Musa (Moses). Until Allah said "your people will pray five times every day, each prayer will be rewarded ten times thus making it equivalent to fifty daily prayers"
Yet again upon descent Moses suggested that Muhammad return and request a further reduction for the same reasons but on this occassion the Prophet said "I have asked my Lord till I am shy to face him. I accept this and submit to this".
On this journey he was taken to Paradise, where he saw dwellings made of pearls and their soils made of musk. He was also taken to hell, where Allah revealed to him scenes from the future. He saw people receiving terrible punishments for different sins.
The Prophet was returned home to find his bed still warm!
"The heart (of Muhammad) did not lie about what he saw, so will you dispute with him what he saw? And he certainly saw him (Jibreal (Gabriel)) in another descent, at Lote Tree of the utmost boundry near it is the Paradise abode. When there covered the Lote Tree that which covered it. The sight (of Muhammad) did not swerve, nor did it trangress its limit. He certainly saw the greatests sign's of his Lord" Chapter 53 An-Najm Verses 11 - 18