The Prophet (may Allah's peace and blessings be upon him) informed that anyone who attended the Battle of Badr, which took place in the second year of Hijrah, fighting alongside the Prophet (may Allah's peace and blessings be upon him), or attended the Treaty of Hudaybiyah, which included the Pledge of Ridwān in the sixth year of Hijrah, will not enter Hellfire.