Babur was the first mughal emperor. In the first battle of Panipat which was fought in 1526, Babur defeated Ibrahim Lodhi.