The Khilafat movement was particularly spontaneous but violent in Malabar following Gandhiji's visit to Malabar in August 1921. Khilafat committees sprang up in different parts of the country. In the meetings arranged by the Congress-Khilafat committees, people witnessed the strange phenomenon of Hindu-Muslim fraternity, it was strange because these were the areas where Hindu-Muslim relations were extremely strained at one period on account of the notorious Mappila outbreaks.
The intensity of Hindu-Muslim harmony and the speed with which the Khilafat agitation gathered strength and momentum in the Ernad and Walluvanad taluks created apprehension and alarm in official circles.
Muslim sepoys who had been discharged after the First World War were many in these areas. They remained unempolyed and their poverty was proverbial. When the Khilafat wrong was made known Mappilas got extremely perturbed and their fanatical proclivity to avenge the wrong though bridled by Gandhiji's call to end the British rule by non-violent resistance, gathered momentum.
The perplexed officialdom decided upon breaking the newly generated spirit through remorseless repression. Meetings were banned and several people were interned in the name of law and order and Mappilas decided to strike back. Khilafat volunteer corps with prescribed uniform was formed in different parts of Ernad as early as February 1921. Ali Musaliar at Thirurangadi advised his followers to help Gandhiji and Ali brothers in furthering the non-cooperation movement and also to do away with Government offices.
On charge of having stolen a pistol from the Nilambur palace, the police attempted to arrest Vadakkevittil Muhammed who was the secretary of the Khilafat Committee of Pukkottur in Ernad. About 2000 Mappilas made an organized effort to foil the arrest.
Next day a police party raided the Mambram mosque at Thirurangadi, seized some records and arrested a few Khilafat volunteers. Raid of the mosque was taken as declaration of war on Islam and angry rustic Mappilas converged on the spot from far and wide to challenge the official intruders.
They were beaten back but the crowd managed to cut down two English officers firing could not break the spirit of the Mappilas. Reinforcements sent from Malappuram were effectively prevented from reaching the troubled spot by the insurgents. As Innes said, "As if at a pre-arranged signal the railway lines were torn up, telegraph wires cut, stations attacked and attempts made to destroy bridges. Next day the column with great difficulty made its way back to Calicut by the railway line and met with rebel activity up to within six miles of Calicut."
For one week Thirurangadi and Malappuram were ruled by the rebels. A rebel Kunhammad Haji, at the former place assumed the title of 'king' and a temporary Khilafat kingdom came into being. Disorder spread to neighbouring areas too. Haji issued edicts against the British and the Janmis had guaranteed protection to the Hindus. Congress leaders, K.P. Kesava Menon, Kelappan, M.P. Narayana Menon, K. Madhavan Nair, and Muhammad Abdur Rahman tried to prevail upon the rebels and establish peace in the area but their efforts proved futile.
From now on the agitation assumed the character of fanatical communal riot. The suspicion that the Hindus were helping the officials in suppressing the rebellion, probably made the Mappilas change their attitude towards their erstwhile fellow non-cooperators.
Considering the Hindus as enemies, they started perpetrating atrocities on them: hundreds of them were killed and many more forcibly proselytized. Panic-stricken Hindus made mass exodus from the affected areas. Even Calicut was in the grip of paralysing fear and nervousness.
Government rushed British and Gurkha troops to the area and clamped down martial law on it. With a heavy hand, they put down the rebellion. The most liberal estimate of the human heads that fell in this undeclared civil war was more than ten thousand, even though Government sources made no attempt to be specific on the issue.
The last act of the drama was the notorious 'Wagon tragedy' in which 61 out of the 90 Mappila prisoners packed in a closed railway goods-wagon and sent to Coimbatore jails, died of suffocation on November 10, 1921. The tragic turn of the Khilafat agitation brought Congress activity in Malabar to a stand-still for quite some time until it was revived in 1924 during Vaikkam Satyagraha Campaign. Non-cooperation and Khilafat movements failed but they aroused the curiosity of the masses and soon nationalism became a serious matter in their life.