Despite having refused to surrender the city, John VII maintained some connections to Bayezid. Early in January 1401, John VII was away from Constantinople, attempting to sign an agreement with Bayezid. Whatever he did, it appears to have worked momentarily as the siege was lifted for a brief period in the summer. In 1402, John VII is recorded as present on an Ottoman military expedition in the Peloponnese. On 1 June 1402, as the siege was escalating, John VII sent a letter to Henry IV of England, writing of the urgent danger threatening Constantinople. About a month after this letter was sent, Bayezid finally left the city, having to deal with the Timurids. Bayezid's defeat and capture at the Battle of Ankara on 20 July 1402, and the subsequent period of Ottoman civil war it sparked, ended the siege of Constantinople and saved the city.