After putting down a brief civil war among the rebellious duchies , the Magyars defeated Otto I at the Battle of Lechfeld in 955 , thus ending the Hungarian invasions of Western Europe .
Otto I , Holy Roman Emperor defeated the Magyars .