Ranti (Acha Septriasa) and Galih (Irwansyah) are childhood friends whose destitute, isolated villages are separated by a river. A local legend states that the river arose when Joko Angin-Angin fell in love with the Moon Goddess and, when they were unable to be together, stomped his feet and cracked the Earth. A related belief is that persons from the separated villages who fall in love are destined to bring doom and disaster to their village. Despite this, Ranti and Galih share feelings for each other, and after completing his university studies in Bandung Galih returns to the village to build a schoolhouse to help Ranti teach the village children. Soon after Galih begins work on the schoolhouse, disaster strikes. One of the village boys is killed when he falls in the river, and Galih and Ranti’s love is blamed. The villagers attempt to stop him from working on the schoolhouse as a measure to prevent disaster, first by knocking over the frame he has built then by killing Galih’s horse and destroying his cart. Ranti, meanwhile, is beaten by her father and locked in a room in the house. Despite this, Galih continues working on the schoolhouse – even after he has fallen ill with typhus – and Ranti escapes, trying to help Galih. When the building is nearly completed, Ranti tends to Galih and tries to convince him to rest so that his typhus can be cured. However, the villagers raze the schoolhouse to the ground. Galih continues to work, while Ranti continues to worry about him – despite her father becoming more and more severe. One day, when Ranti tries to return home after escaping again to take care of Galih, her father beats her into a coma. When she awakens three days later, she rushes to the schoolhouse and finds it completed, with a water wheel to provide electricity. With the villagers, led by her father, coming to burn it to the ground again, Ranti looks for Galih and finds him collapsed on a pier. He tells her to connect the electrical cord from the water wheel to the schoolhouse and, when she does so, the lightbulb flashes on and gives pause to the would-be attackers. Galih dies of his typhus in Ranti’s arms as she cries. Ultimately she is able to use the schoolhouse to teach. Her love story with Galih, meanwhile, is passed from generation to generation.