Imam al-Shafi'i (may Allah have mercy on him) said: "It has reached us that Sayyiduna Ali (may Allah be pleased with him) was once delivering a sermon when, in the course of it, he heard the slogan of tahkim (arbitration) from one corner of the mosque: 'There is no judgment except Allah's.'"
Then Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) said: "There is no judgment except Allah's. (This is) a word of truth by which falsehood is intended. You have three rights over us: we will not bar you from the mosques of Allah, that you may remember the name of Allah in them; we will not deprive you of the fay' (state revenue) as long as your hands are with our hands; and we will not be the first to fight you."
Kathir bin Namir said: Sayyiduna Ali (may Allah be pleased with him) was delivering a sermon when a man stood up and said: "There is no judgment except Allah's." Then another stood up, and many people stood up from the corners of the mosque, all of them saying the same. So Sayyiduna Ali (may Allah be pleased with him) said: Sit down. "There is no judgment except Allah's" is a word of truth by which falsehood is intended.
The rest is as in the narration of Imam al-Shafi'i (may Allah have mercy on him) above.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16763