In 1077, he was released (for a ransom) from his Constantinopolitan imprisonment to lead a battalion against the rebel Nicephorus Botaniates. He defeated him handily, but then played the traitor and joined him. This time, the emperor called up the Seljuks again and they defeated and captured him at Nicomedia. He was given over to Byzantium and executed.