Husayn and Caliphate
According to the Shia, Hasan was supposed to be the successor to Ali after Muhammad. Muawiyah had fought with Ali during his time and after his death, as Hasan was supposed to take Ali's place in successorship, he was another threat to Muawiyah in which he prepared to fight with him again.
Muawiyah began fighting Hasan and it led to inconclusive skirmishes between the armies of Hasan and Muawiyah. Thus, to avoid the agonies of another civil war, he signed a treaty with Muawiyah and relinquished the control of what had turned into an Arabian kingdom. Hasan's only condition in the treaty was that Muawiyah wouldn't name a successor during his reign and let the Islamic world choose their successor after the latter. After establishing his power, Muawiyah poisoned Hasan in 50 AH. And after Hasan's death, he then named his son Yazid as his successor.
Read more about this topic: Hussein Ibn Ali