Hazrat Ali RA'S Assent As Khalifa
Regarding election of Hazrat Ali (rta) : Please refer to the video below ( specifically from 5:02 to 22:36 ) https://youtu.be/tnsnFeReZ-s?si=PiiSLdgZGxMJTGKh&t=302
Yes, we can say that it was a combination of both these factors.