Answer:
The ruler that became emperor after pushing back the Magyars who attacked from the east was Otto I.
Explanation:
Otto I was king of Eastern France from 936 to 973 and emperor of the Holy Roman Empire from 962 to 973.
Otto I reaped an important success on the banks of the Lech River on August 10, 955. That day the Battle of Lechfeld took place, in which he defeated an enormous host of Magyars, to whom the German lords had appealed in order to overthrow him. To that end he recruited an army of knights from all parts of his kingdom which caused enormous losses to the Magyars as they crossed the Lech River in disorder.
With this victory he put an end to the Magyar menace, which gave him a great reputation and earned him the title of 'the Great'. That same year he directed his weapons against the Slavs of the Elbe, whom he defeated in the battle of Recknitz, action that drove the Germanic expansion towards the east.
Then he went to Rome, where he was crowned emperor of the Holy Roman Empire on February 2, 962.