This was “The Vampire Diaries” episode that everyone has been waiting for. Nina Dobrev made her final appearance in the Season 6 finale, and everyone said goodbye to Elena (Dobrev). Many fans suspected she would die. There were definitely some deaths in the finale, but Elena wasn’t the only one in danger in Season 6, episode 22.

The episode opened with Damon (Ian Somerhalder) lying on the road where he and Elena first met. They kissed. “It’s bad, isn’t it?” she asked. Damon didn't want to talk about it. He just wanted to dance with her.

Suddenly, the finale cut back to Jo (Jodi Lyn O’Keefe) and Alaric’s (Matt Davis) bloody wedding, right where we left off last week. Damon ran Elena to the hospital. Then, Kai snapped Caroline (Candice Accola) and Stefan’s (Paul Wesley) necks.

The Gemini coven started to chant around him. They would send him back to the prison world, but Kai didn’t seem worried.

When Alaric asked why he had killed Jo, Kai explained: “When your family decides that you’re an irredeemable piece of trash, well, I guess the best thing to do is prove them right.” Then Kai stabbed himself in the neck with a piece of glass. As the leader of the Gemini coven, Kai’s death would kill his whole family.

Bonnie (Kat Graham) was still at the Salvatore house with Matt (Zach Roerig) and called Damon to tell him Kai was back. Damon revealed that Kai had already killed Jo and explained that doctors claimed there was nothing physically wrong with Elena.

Outside the barn, Liv (Penelope Mitchell) and Tyler (Michael Trevino) were badly hurt. Liv knew she would die because of Kai, but Tyler didn’t have to. She tried to persuade him to trigger the werewolf curse. There was a full moon. If he killed somebody, it would trigger the curse and heal him. She told Tyler that she loved him and asked him to kill her. She said that she wanted him to, so he covered her mouth and her nose until she was dead. He started to transform right away.

Enzo (Michael Malarkey) took Caroline and Stefan out of the barn to catch up with Lily (Annie Wersching), who was still searching for the friends she thought had returned. Stefan told his mother that Kai had lied about bringing the witch/vampires back. Stefan said he would give up on her if she didn’t come with him and return to her cell. She stayed on the lot of storage containers, hopeful that she would find her friends. Stefan asked Lily what she gave Kai in exchange for her friends. She gave him her blood.

Since he had vampire blood in his system, Kai woke up shortly after his death as a vampire and drank his father’s blood. He still had his witch powers, too.

Alaric took a gun out of his glove compartment and tried to shoot Kai as soon as he saw him. As a vampire, Kai wasn’t stopped by a few bullets. Alaric put the gun to his own head instead, but he’d already used up all of his ammunition. Luckily, Tyler was in midtransformation and bit Kai, poisoning him with werewolf venom.

Kai came to Elena’s bedside and asked Damon what was happening to him. Damon said he could get the cure for a werewolf bite from New Orleans, but he needed to know what was happening to his girlfriend.

At the same time, Bonnie found that Kai had left a message on her video camera. The evil witch explained that as long as Bonnie was alive, Elena would be asleep. If Bonnie tried to break the spell, both she and Elena would die. “This is kinda all your fault,” Kai said.

Kai was in the hospital explaining the situation to Damon. He told Damon that he could just kill Bonnie and get his girlfriend back. It was that simple.

Later, Stefan and Caroline visited Elena in the hospital. Caroline asked if he was OK. Stefan explained that Elena wasn’t his soul mate. She made him realize that Damon was a person who deserved to be loved. “Yeah, I loved her more than I ever thought I could love somebody else,” he explained. “But I think in the end, I needed him more than I needed her.”

He asked Caroline if his past with Elena was why she wanted to stay away from him. Caroline said it wasn’t, but she didn’t give a real reason. She said she couldn’t do this and walked away.

Back in the barn, Bonnie confronted Kai. She tried to torture him with magic and get him to undo the spell. Then Bonnie said she’d wait for the werewolf bite to kill him, and suddenly, he realized that he could control the venom because it was magic. Kai healed himself and threw Bonnie across the room.

In another cut to a dreamlike scene, Damon and Elena were in the road again. Damon explained what Kai did. She asked him what he was going to do.

Back in the real world, Damon came to the barn and saw Bonnie gasping for air. Her lung had collapsed and she’d die soon. Damon had to make a choice. “I’m so sorry, Bonnie,” Damon said as he kissed her forehead. He walked away and left Bonnie behind.

“The whole point was that this would torture him for a while,” Kai complained. He thought it was too easy -- and she was right. Suddenly, Damon came up from behind Kai and ripped his head off. Kai was dead. Damon gave Bonnie his blood to heal her and said he wasn’t done creating fun nicknames for her.

Even with Kai dead, the spell still didn’t break. Bonnie and Caroline met up with the entire gang at the Salvatore house. They saw Elena in a casket. Caroline guided Bonnie into Elena’s thoughts. The three girls were at a sleepover. Elena told Caroline to take care of everyone. She asked them both to promise to keep diaries of all the good stuff in their lives so she could read it all when she woke up.

“This isn’t your fault,” Elena told Bonnie. “We’ll both get everything we want. We just can’t have it at the same time.” She said she was finally making a sacrifice for Bonnie after Bonnie had made so many for her. In a nod to one of the first episodes, she asked Bonnie to levitate the feathers from her pillow one last time.

Matt also stopped into her mind for a good-bye. Elena and Matt were on the bridge that they once drove off of. It was the incident that made her a vampire. They threw flowers over the bridge, and Elena said she wasn’t ready to say goodbye. She told him that she was wearing a cop uniform because that was her hope for him. Elena wanted him to fight for people who needed it. He didn’t think they’d see each other again, but she thought they had decent odds. Crazier things have happened to them.

Elena and Alaric were training in the woods, and she asked him not to give up after Jo’s death. Elena guided Alaric through the grieving process. She told him to let himself feel everything, and he'd be able to get through it.

Her brother Jeremy made a surprise return, and they had a nice moment together. Finally, Elena broke down in tears. Jeremy promised he was happy in his life.

She met Tyler in a basement while he was in chains and noted that they weren’t in Mystic Falls. She told him to embrace being a werewolf. “Let it be the thing that makes you extraordinary,” she said.

Elena and Stefan were on a five-mile hike where she told him she didn’t want to be a vampire. Elena told him that he knew her better than anyone. “You already know how impossible it is for me to find the words to say good-bye,” Elena said.

She thanked Stefan for bumping into her in the hallway that day. “I love you so much, which is why I can’t wait to find out what life you’ve chosen for yourself in 60 or 70 years, when I see you again,” she explained. She told him to be happy and that she’d see him soon.

Bonnie was going to cloak the coffin in the Salvatore crypt so that no one would find it. After all, anyone who found out that Elena had the cure in her blood could target her.

At last, Stefan left Damon alone to say his final good-byes. Damon and Elena were on the road where they met, just like in the other scenes throughout the episode. Damon told her that she could’ve told him what to do about the Bonnie situation, but Elena knew he was capable of making the right choice without her. “I knew that the love of my life would stand by his best friend, even if it meant having to live without me for a little while,” Elena said.

Elena told him that he couldn’t shut down after this. She wanted him to be happy, and they danced together (which was a nice throwback to the Miss Mystic Falls pageant). She asked him if he was ready, and he said he’d never be ready to give her up. They said they loved each other and had one last dramatic kiss.

While Damon was putting the love of his life to rest, Stefan was trying to convince his love that they were right for each other. Stefan made a list of all the ways loving Caroline had changed him. He said that she was a positive influence on his life and he'd wait for her to finally see that. “I understand if I have to wait for you, and I will,” he told her.

Of course, the episode couldn’t end on a vaguely happy note. Enzo went to see Lily and said he didn’t think she was a monster. She explained that she was always miserable before she met her friends. Enzo said he understood and that he’d been searching for something like that his whole life. Suddenly, he saw a building that wasn’t there last night. Kai had a building cloaked, and the spell lifted when he died. Once they were inside, Lily was reunited with her family of vampire witches.

In a flash-forward, Damon was on the clock tower, and he didn’t look like he was living the happy life Elena wanted for him. He looked miserable as he watched Matt on the road below driving the sheriff's truck around Mystic Falls.

“The Vampire Diaries” Season 7 will premiere on the CW in the fall. Are you happy with how Elena was written out of the show? Or was it too perfect? Sound off in the comments section below!