He has appointed loyalists to crucial jobs that are supposed to be independent of the presidency, such as attorney-general, and replaced a third of judges with people friendly to him.