In spite of Karamanlı Mehmet Pasha's attempts at secrecy, the Sultan's death and the grand vizier's plan were discovered by the Janissary corps, who supported Bayezid over Cem and had been kept out of the capital after the Sultan's death.