Al-Sha'bi (may Allah have mercy on him) says that when Sayyiduna al-Hasan (may Allah be pleased with him) gave up the matter (of the caliphate) in favour of Sayyiduna Mu'awiyah (may Allah be pleased with him), Sayyiduna Mu'awiyah (may Allah be pleased with him) said to him: "Stand up and speak." So Sayyiduna al-Hasan (may Allah be pleased with him) praised and glorified Allah, then said: 'Amma ba'd' (To proceed): "The shrewdest shrewdness is piety, and the greatest incapacity is wickedness. Indeed, this matter in which Mu'awiyah and I differed is either the right of a man who was more entitled to it than me, or it is my right which I have left for Mu'awiyah, seeking the good of the Muslims and the sparing of their blood: 'And I do not know; perhaps it is a trial for you and an enjoyment for a while.' [Surah al-Anbiya: 111]" Then he sought forgiveness and came down.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16712