Rem dies when she uses the Death Note to save Misa's life. Light writes down L's name in the notebook and L dies. Light is happy and feeling victorious but then L appears, still alive. What really happened was that L faked his death and his team switched one page of the notebook with a regular page so that writing down L's name would have no effect. Light is surrounded and about to be arrested and he gives a speech about how being Kira and using the notebook is "true justice" in a corrupt world. Light tries to get away and write down names in a small piece of Death Note paper, hidden in his watch, but he is shot. Ryuk reminds Light that he was never on his side (and the only reason he accompanied him is because he was bored) and that he would one day eventually write down his name in the notebook. Ryuk writes Light's name and he dies.