A powerful justice has become a liability for the reelected president just as he prepares for a new term promising to heal the country's divisions.