The series finale for HBO's Boardwalk Empire left some fans pretty shocked, but for creator Terence Winter it was all about telling an authentic story.

Former 'Boardwalk Empire' Star Predicted Finale 

Atlantic City's Nucky Thompson (Steve Buscemi) managed to make it through nearly to the end of the prohibition drama, which lasted five seasons before calling it quits. Nonetheless, Nucky couldn't escape his past and during the final moments of the series, Joe Harper (Travis Trope) revealed himself to in fact be Tommy Darmody, son of the slain Jimmy Darmody (Michael Pitt). Tommy then shot Nucky a number of times, with a final bullet to the head, just below the eye at close range as Nucky had done when he killed Jimmy at the end of Season 2.

"This ending was so much more personal and so much more satisfying," Winter told Deadline on Sunday. "Nucky is the cause of his own undoing, it's an act of betrayal come full circle."

Find Out Who Was 'Always' Going To Get Killed Off 'Boardwalk Empire'

While Nucky Thompson is based on real-life Atlantic City criminal Nucky Johnson, Winter and his team chose to change the name so that they could take artistic license when it came to telling Nucky's story. They didn't want to be committed to the history.

"Howard, Tim and I came to this conclusion at the end of Season 4…" explained Winter. "There's the true to life version of Nucky's end where he went off into the sunset and into obscurity, but our Nucky isn't Nucky Johnson, and this ending felt like the more dramatic choice, the better choice in wrapping up his life."

While Nucky's death had only been planned a season in advance, it did satisfy a number of different storylines throughout the season. It avenged Jimmy, whom fans were awe-struck to see go after only two seasons. It also brought everything back to the very beginning, to the act which led to Nucky's ultimate misery. As a young man he had essentially sold his soul to get ahead professionally, giving a young Jillian Darmody over to the Commodore, who raped the young girl. Jillian became pregnant and gave birth to Jimmy, who in turn grew up and turned on Nucky. As a result Nucky fought back and murdered his surrogate son, but not before Jimmy managed to have a young son of his own: Tommy.

The moment in which Tommy murdered Nucky was juxtaposed onscreen with Nucky's betrayal of a young Jillian, which tied everything together for a surprisingly haunting and sentimental effect. As Winter said, Nucky was "the cause of his own undoing" and the sins of his past ultimately robbed him of any happiness in the future.

Boardwalk Empire ran on HBO for five seasons before ending on Sunday, Oct. 26.