“Arrow” Season 4, episode 18 saw Oliver Queen (Stephen Amell) fight his greatest and most costly battle yet. The CW

It was a very emotional episode for “Arrow” fans on Wednesday as the CW show made good on its promise from the beginning of the season to put one unlucky cast member in the grave. With more villains in town than usual and the group down its resident hacker, Team Arrow went into Season 4 episode 18, titled “Eleven-Fifty-Nine,” with the deck pretty heavily stacked against them.

The installment opens by addressing the cliffhanger ending from last week’s episode, which saw Andy Diggle (Eugene Byrd) agree to work with Malcolm Merlyn (John Barrowman). He shows up to his brother’s house and John Diggle (David Ramsey) asks him what’s going on. As Andy tells the story — he was approached by Merlyn, who revealed that both he and the villainous organization known as H.I.V.E. know he’s alive and has turned on their ranks — Diggle tells the rest of the team that Andy’s next mission is to steal a stockpile of missiles that will be transported the next day.

While the rest of the team prepares for the operation, Oliver (Stephen Amell) makes one last move as the former mayoral candidate of Star City. Ruve Adams (Janey Kidder), the secret wife of the villain Damien Darhk (Neal McDonough), has officially won the election and it’s tradition in the city for the loser to attend the acceptance speech. While there, Adams tells Laurel (Katie Cassidy) that she was so impressed with her work on Darhk’s case that she wants to promote her to District Attorney.

While the Black Canary mulls over the decision to be a vigilante who holds such a high-profile job by day, she and Thea (Willa Holland) lend support from the Arrow lair as John and Oliver wait to hear from Andy. They see the truck and realize that H.I.V.E. is working with Merlyn’s League of Assassins loyalists. However, the duo have no trouble stopping the heist, which Oliver finds oddly suspicious.

It turns out, he was right. While they were busy stopping the caravan from being attacked, Merlyn personally attacked Thea and Laurel with his trademark appearing out of nowhere move. Laurel fends off his soldiers and Thea manages to stop her one-handed father. However, when she hesitates to kill him, he seizes the opportunity and knocks her out. When she comes to, and Oliver and Diggle return, they find that Merlyn has stolen the mystical idol that was giving Damien Darhk his powers. It’s clear to them now that Merlyn is planning to bust the villain out of prison in exchange for him sparing himself and his daughter from Darhk’s sinister plan to wipe out Star City. Although Diggle doesn’t see it, Oliver privately tells Laurel that he believes Andy was working with Merlyn to draw him away from the idol. Luckily, it seems the hero had a backup plan.

Oliver had encountered the idol once before, in the running flashback on Lian Yu that’s been progressing throughout Season 4. When Merlyn attempts to deliver the idol to Darhk in prison, the villain reveals it’s got a vital piece missing and, thus, can’t give him back his magical powers. With the clock ticking, Merlyn is told that if he doesn’t get the piece back soon, he and his daughter will have a lot to fear from Darhk. Although the villain is pretty much useless without his powers or access to his financial resources, the Dark Archer seems scared.

Team Arrow sends Laurel to search the prison as the current District Attorney candidate, but she doesn’t find anything and only succeeds in making the villain mad. Meanwhile, Oliver gives Andy a job to do but instead follows him to John’s apartment and finds him searching the place. He tells the Green Arrow that he’s looking for surveillance bugs in his brother’s house, but Oliver doesn’t believe him and starts to torture him for information. John walks in at the exact wrong time and pulls a gun on Oliver and demands he get out of his home.

Back at the lair, the two exchange heated words with Oliver explaining all the reasons that they can’t trust Andy. Diggle counters by reminding the hero that he was the one who convinced him that Andy could be redeemed in the first place. He says that his breakup with Felicity (Emily Bett Rickards) is making him lose faith in people and that his attachment to the darkness is the reason he lost his girlfriend.

“Arrow” Season 4 character Laurel Lance (Katie Cassidy) had a big part to play in episode 18, titled “Eleven-Fifty-Nine.” The CW

While they’re arguing, an impatient Darhk launches his own plan to escape prison early. He has his ally deliver books with various prison-grade weapons inside. In a scene that was almost too brutal for a CW show, the inmates take over the prison and viciously stab most of the guards. Darhk insists they keep some of the guards alive as hostages, forcing the team to spring into battle. Before they leave, Laurel confesses to Oliver that she’s decided to take the DA position and believes this will be her last outing as the Black Canary.

Thanks to a little distraction from Quentin Lance (Paul Blackthorne), the gang easily slips inside, along with Andy. Despite his tension with Oliver, it seems that John saw it fit to bring him along for the ride. They split up in search of Darhk, and Thea and Laurel encounter Merlyn. Thea instructs her friend to continue the search and she squares off with her father as the rest of the team corners Darhk and his hostages.

A fight ensues and Darhk manages to get a gun on Andy. He demands that the team drop their weapons, and John makes them comply. As soon as they do, Andy reveals that he has in fact been a traitor to Team Arrow the entire time. Just as Thea and Merlyn enter from their fight, Andy lays all his cards on the table. Not only has he been working for Darhk, but he managed to steal the missing piece of the idol. With his powers fully restored, the team’s collective efforts are no match for Darhk, who freezes them all in place and makes them watch his next heinous move.

It’s not lost on Darhk that Laurel was working tirelessly to keep him in jail and that her dad betrayed him in order to help. He tells her that, nine months ago, he promised Quentin that he would hurt his daughter if he ever betrayed him. Telling the Black Canary that he’s a man of his word, he drives an arrow into her chest and escapes prison with about 50 other inmates. While that’s certainly a problem for Star City, Team Arrow has more immediate problems. They quickly get the Black Canary to the hospital, revealing her identity to a slew of medical staff. They leave and change out of their superhero attire and quickly return as Laurel’s friends.

Fans were previously teased that this episode would be the end of one character, which is why it was so surprising for the doctors to reveal that surgery went well and Laurel would be fine. She wakes up and tells the team that she loves them and could never step away from her Black Canary persona. She then asks for another private chat with Oliver. The two share a tender moment in which she talks about their past together and reveals that, although she’s happy for him and Felicity, she knows that there has always been a special bond between them.

“I know I’m not the love of your life, but you’ll always be the love of mine,” she tells the hero.

With that, she instructs him to listen to her as she has a very personal favor to ask. From there, the episode cuts to the hallway where a rush of panicked doctors enter and try desperately to revive her. It’s unclear what happened in her chat with Queen, but the next scene shows her dying on the hospital bed once again. This time, however, no one saves her and her time of death is called at 11:59. The episode ends on a low note as Quentin arrives just in time to see the team grieving at the loss of their friend and ally.