Lost - Season 6 Episode 17 The End Everything happens for a reason.
Overview: For different reasons, Jack and the Man in Black both use Desmond to extinguish the light at the heart of the island. The island starts disintegrating, but The Man in Black is also made mortal. Still desperate to escape, The Man in Black fights Jack and mortally wounds him, but with help from Kate, Jack kills him. Realizing his destiny, Jack sacrifices himself to relight the heart of the island, so his friends can escape on the Ajira plane. Hurley takes Jack's place as protector of the island and makes Ben the new advisor. The flash sideways is revealed to be a type of limbo, or holding pattern, for the main characters, where they reside until accepting their life and death, and are then able to "let go" and "move on" together.