However this alliance failed to help John's successor, his brother David. Mehmed II, the Ottoman ruler, marched on the imperial city of Trebizond in 1461. Uzun Hassan initially supported the Trapuzentines, but he was persuaded by the Ottomans to abandon Trebizond. After securing the eastern border, Mehmed attacked Trebizond, which surrendered 15 August 1461, ending the polity.