Imam Hasan (A.S.) succeeded Amirul Mumineen soon after he passed away and took over the zaheri khilafat of the ummah in Kufa. After the shahadat of Amirul Mumineen Mu'aviya's threat to Iraq started to increase. Imam Hasan on the other hand, faced extremely difficult conditions from the start. He observed that fear, anxiety and much distress were ever present in Kufa, Basrah, Medina and other towns. The anxiety, uncertainty and insecurity were caused by Mu'awiya's ill dealing of sincere Muslims. Mu'awiya had spread secret agents all over to defame Ahlul Bayt. Imam Hasan knew that his father Moulana Ali (a.s.) had stood like a lion in all difficulties and fought battles against Mu'awiya, but these confrontations had resulted in heavy casualties on both sides. A mass scale family devastation was visible everywhere. Considering all circumstances, Imam Hasan (a.s.) discussed the matter with his brother Imam Husain (a.s.) and other relatives. He revealed to them that in order to end the bloodshed and to provide a reasonable safety and security to the Ummah, he would make a peace agreement with Mu'awiya and abdicate until after Mu'awiya's death. After a few days of careful consideration, Imam Hasan (a.s.) accepted an agreement as per the terms dictated by the Imam and agreed to by Mu'awiya. Four noteworthy terms of this agreement were:
People of Syria, Iraq, Hijaz, Yemen and other places shall enjoy amnesty against persecution,
Friends and companions of Muolana Ali (a.s.) and all their women and children shall be protected from all dangers,
Mu'awiya is to immediately stop the use of abusive language with reference to Ahlul Bayt (cursing Muolana Ali) after Salat of Jumu'a, and
Mu'awiya shall not appoint anyone as his successor.
Once the treaty was signed, Imam Hasan (a.s.) and brother Husain (a.s.) moved out of Kufa and settled in Medina. Over there both Imams lost no time in holding nightly meetings for Islamic discussions. The nightly meetings proved very successful and gained tremendous popularity. More people started to attend, to hear the Imams give of their fountain of knowledge on Islam and humanity. The reputation of these meetings began to fly to far away places. People from as far away as Egypt, Iraq, Yemen, and other distant areas travelled to Medina to learn about the Islamic values. As years passed, the knowledge thus given started to bear fruits. The number of Islamic scholars multiplied and increased considerably.
In the meantime Mu'awiya, unabashedly elected to disregard the terms of his treaty with Imam Al-Hasan. a) He sent secret agents to terrorize, kidnap, or even kill innocent people specially those who were loyal to Ahlul Bayt (a.s.). b) Instead of helping the needy with the public treasury, Mu'awiya's governors and their surrogates used the public treasury for personal use, freely and excessively as they wished. c) Freedom suddenly died, and dictatorship took its place. d) Mu'awiya gathered a very large number of collaborators who unabashedly would do any thing for money.
Mu'awiya's ill deeds against the Karam and generosity of Imam Hassan became uncovered and the knowledge that Imam Hasan imparted opened the eyes of the Ummah towards the truth. A few of Amirul Mumineen,s companions began to oppose the decission of Imam Hasan for the treaty. The Zikr of jabir bun Abdullah Al-Ansari is famous in this context where Imam Hasan showed jabir a Mo'jiza and Rasullah SA arrived to declare Jabir the righteousness of the decision of Imam Hasan AS.