The bloody “Battle of the Bastards” fight scene that played out on Sunday night’s action-packed Game of Thrones episode was based off of a real-life Roman war.

Miguel Sapochnik, who directed the episode, told Entertainment Weekly that he looked to history for inspiration on how to best have Jon Snow and Ramsay Bolton face off—specifically, the Battle of Cannae between the Romans and the Hannibal-led Carthaginians in 216 BCE.

In that ancient battle, Carthage beat the giant Roman army in a crushing defeat in part by circling their enemies through a double envelopment. Showrunner D.B. Weiss said that aspect was used as a model in the elaborate “Battle of the Bastards” fight sequence, according to IGN.

Read More: The Astounding Numbers Behind Game of Thrones’ Battle of the Bastards

But what were the Romans actually fighting about back then?

The significant battle during the Second Punic War was fought near the ancient village of Cannae, which was about 300 miles south of Rome. The village controlled the approaches to southern Italy and had a granary key to supplying food to Romans, according to Dickinson College Commentaries.

Get your history fix in one place: sign up for the weekly TIME History newsletter

The Ancient Greek historian Polybius described what happened:

The Romans…progressed so far that they now had the heavy-armed Africans [Hannibal’s forces] on both of their flanks. Hereupon the Africans on the right wing facing to the left and then beginning from the right charged upon the enemy’s flank, while those on the left faced to the right and dressing by the left, did the same, the situation itself indicating to them how to act. The consequence was that, as Hannibal had designed, the Romans, straying too far in pursuit of the Celts [also of Hannibal’s forces], were caught between the two divisions of the enemy, and they now no longer kept their compact formation but turned singly or in companies to deal with the enemy who was falling on their flanks… The Romans as long as they could turn and present a front on every side to the enemy, held out, but as the outer ranks continued to fall, and the rest were gradually huddled in and surrounded, they finally all were killed where they stood… Such was the outcome of the battle at Cannae between the Romans and Carthaginians, a battle in which both the victors and the vanquished displayed conspicuous bravery, as was evinced by the facts.

The battle is still credited by many as one of military history’s most significant strategic moments.

Get our History Newsletter. Put today's news in context and see highlights from the archives. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.