African mediators appointed him prime minister on Sunday , ending a deadlock between Mr. Gbagbo , opposition leaders and rebels .