He was instrumental in making sure that the African Union did not destroy its international credibility by installing Sudan 's president , Omar Hassan al-Bashir , as its head despite the continuing carnage in Darfur .