Maulana Mohd Ali & Maulana Shaukat Ali were at the forefront during Khilafat Movement. In the 1919 Congress Session, they asked Gandhi's help for the Khilafat movement, many leaders were against this because the worldwide Caliphate had earned a bad name & they didn't want Bharat's Muslims to go with desert culture, but Gandhi out of Muslim love assured them his support.
The Congress Leaders in turn asked Muslims to stop “Cow Slaughter”, again Gandhi intervened & said, we must not expect anything from Muslims, it's a welcome move if Muslims reciprocate our gesture by stopping the slaughter, but we must not impose restrictions on them.
Even Nehru also believed Ali brothers are using Hindus as Pawns, but Gandhi stuck to his belief, he said, I will trust them even if they deceive me 1000 times. For the next 2 years, Ali Bro's went where ever Gandhi went & Gandhi used to say in public, I'm in their (Ali) capacity & they used to say we go wherever Sarkar (Gandhi) asks us to.
In 1923, Sept 09, riots between Hindus & Muslims started, Gandhi came to Delhi stayed at Ali's house & started 21 Day Satyagraha for Communal Harmony, but he didn't get any support from these Muslims bro's. The Ali's who was licking his feet started showing their colors down the line. At Ajmer & Aligarh, in the open platform they announced, “Mr. Gandhi however good he is, when viewed from Islamic Point Of View is less human than most immoral Muslim”
Dr. Bhimrao Ambedkar in his book “Thoughts On Pakistan” writes, When asked Mohd Ali about the earlier statement, Ali replied, “Yes It's True, According to Islam & Myself, A Muslim Visiting Prostitute Is Better Than Gandhi” (Pg 302). The pertinent question is Did Ali Bro's used Gandhi for their whims & wishes? In a letter to Swami Shraddanand & which is available at Gandhi's “Collected Works -13”, pg 567-69, Ali explains, When I was with Gandhi, even Muslims accused me of siding with Hindus & marginalizing Muslims, I said to them I'm Prophet Mohammed's Follower & not Gandhi's, I wished Gandhi turned to Islam but realized he Can't be a Muslim & found the most corrupt Muslim is better than Gandhi.
While this happened & Ali bro's shooed him away, Gandhi was preaching “They were with us till now & we must not harbor ill feelings against them instead thank them for being with us”.
Did Gandhi learn a lesson from this? No, instead he asked Hindus to surrender themselves if a Muslim wanted to Rape & Kill.