Babur began relations with the Safavids when he met Ali Mirza Safavi at Samarkand; their good relations lasted even after Babur was approached by the Ottomans.
Babur's early relations with the Ottomans were poor because the Ottoman Sultan Selim I provided his rival Ubaydullah Khan with powerful matchlocks and cannons [REF].