In the month of the Holy Ramadan, it was the practice with the Holy Prophet that he would stay in the mosque after the Isha prayers, and offer extra prayers. One night as the faithful saw the Holy Prophet offering extra prayers, they also prayed as the Holy Prophet did. The following night more Muslims stayed in the mosque after the night prayer to offer extra prayers. On the third night there was a still larger gathering of the Muslims to perform the extra prayers. On the fourth night when a large number of the faithful assembled to offer the extra prayers, the Holy Prophet did not offer the extra prayers and retired to his house immediately after the Isha prayers. For the following nights as well the Holy Prophet retired immediately after the night prayers, and gradually the number of Muslims who offered the extra prayers diminished. Then one night the Holy Prophet offered the extra prayers again. When the Holy Prophet was asked about the reason for the break in the extra prayers for some nights he said that he had avoided these prayers lest the Muslims might take them to be an obligation under law, and that might become a burden for the Muslims. The Holy Prophet explained that such prayers were not compulsory, but if any one offered them voluntarily, he would have the blessing of God. Thereafter it became the practice that some Muslims offered the extra prayers during the month of Ramadan on their own account, while others did not, and retired to their homes after offering the night prayers.
When Umar became the Caliph, he saw that many Muslima gathered in the Prophet's mosque to offer extra prayers after the night prayers. Each person prayed according to his own discretion, and there were no specifications about the number of Rakaats to be offered. Umar felt that it would be a reform in the proper direction, if the prayers were offered in congregation and the number of Rakaats was fixed. After consulting the Companions, Umar issued instructions in 635 AD that such extra prayers should be offered in congregation under the imamate of a Quran reader who should recite a considerable part of the Quran each night, so that the entire Quran was completed during a week or so. It was laid down that these prayers should comprise ten taslima's each containing two rakaats and that after every four rakaats there should be a rawih' or a pause. Because of such pauses these extra prayers came to be known as 'Tarawih'.
These instructions were circulated throughout the Muslim dominions. There were some who felt that as the Holy Prophet had not prescribed such prayers, it was unlawful to prescribe such prayers after the death of the Holy Prophet. Umar explained that he was not prescribing these prayers as compulsory; it was open to any one to offer or not to offer these prayers at his discretion. If any one offered these prayers that would be to his credit, but if any body did not do so that would not bring him any discredit. He also elucidated that his instructions being of an advisory character only were in no way repugnant to Islam. If he had instructed the Muslims to do what Allah or the Holy Prophet had prohibited that would have been repugnant to Islam, out if he wanted the Muslims to do anything at their option which was intrinsically good and had not been prohibited, that was not repugnant to Islam, but was on the other hand in consonance with the spirit of Islam.