The envoys of Louis XIV of France and Apafi signed a treaty in Warsaw in May 1677. The French promised to send an annual subsidy to the Kuruc to finance their fight against the Habsburgs. Apafi did not declare war on Leopold I, but promised to secure the professional command of the Kuruc troops and to provide asylum to them in case of defeats. Emeric soon started to urge Apafi to allow him to join the refugees. Louis XIV's envoy, Abbé Dominique Révérend, who met with Imre around that time, described him as "the most powerful lord and the most honest men in Hungary". The princely council appointed Emeric to command the Kuruc army on 26 September. Apafi also authorized him to raise volunteer troops in Transylvania.