Babur's early relations with the Ottomans were poor because the Selim I provided Babur's rival Ubaydullah Khan with powerful matchlocks and cannons.[25] In 1507, when ordered to accept Selim I as his rightful suzerain, Babur refused and gathered Qizilbash servicemen in order to counter the forces of Ubaydullah Khan during the Battle of Ghazdewan in 1512.