The Tragic Turn: The film does not have a typical happy ending. Ofelia's mother dies in childbirth. The Faun demands Ofelia sacrifice her baby brother to open the portal. Ofelia refuses, choosing to protect the innocent.
The Climax: Captain Vidal shoots and kills Ofelia. As she lies dying, her blood drips onto the altar. This sacrifice of her own blood (not the innocent baby's) satisfies the test. In the real world, Mercedes and the rebels execute Vidal.
The Transcendent Ending: Ofelia dies in the real world, but her spirit is shown returning to the Underworld as Princess Moanna, reunited with her parents. She rules wisely for centuries. The final shot shows a flower blooming on the dead fig tree, suggesting her sacrifice left a trace of magic in the world.