In 1463, Mahmud led the invasion and conquest of the Ottoman vassal state of Bosnia, even though a peace treaty between Bosnia and the Ottomans had just been renewed. He captured the Bosnian king, Stephen Tomašević, at Ključ, and obtained from him the cession of the country to the Empire.[14]