The Moplah regiments are descended from the Madras infantry line. The 77th comes from the 17th which was raised before 1861, the watershed date after the Mutiny, but the raising and re-raising and re-numbering makes tracing regimental origins difficult. The original 17th was raised in 1777 but renumbered 2/1st in 1796. At that time, in 1796, the 33rd and 34th who were both raised in 1800 became the 1st and 2nd battalions respectively of the new number 17.
Although the Moplahs took on the position in the Madras infantry line of the 17th and 25th, it is unlikely that any Moplahs were in those regiments prior to 1902 as they had, as a race, a reputation for causing trouble. An official report had earlier dismissed them as 'a turbulent and fanatical community'. In the previous 60 years they had participated in no less than 33 outbreaks which required military assistance to supress.
Troublesome races had been successfully recruited into the army before (eg. Sikhs and Gurkhas) so it seemed a good idea to try the Moplahs. But they fell foul of Lord Kitchener's reductions of 'generally inefficient' Madras regiments and were disbanded in 1907.
The Moplahs continued to cause trouble to the British, and in Malabar in April 1921 an uprising began that lasted for 6 months. Two British and 4 Indian battalions together with a squadron of The Queen's Bays fought Moplah civilians armed with sticks, swords and stones. 43 soldiers and policemen were killed and 126 wounded whilst Moplah losses amounted to 4000. The jails must have been busy that year because 45,000 were rounded up and imprisoned.