Although it’s a challenge to watch “Beyond the Hills,” a long and troubling Romanian drama, the film offers rewards for the patient viewer as it examines conflicting visions of love played out in a remote, faith-based community.

The setting is a monastery in the bare Romanian countryside, where Orthodox nuns live simple lives of worship and hard work under the direction of a priest and his wife. As the film opens, one of the younger nuns, Voichita (Cosmina Stratan), is at the train station to meet a friend, Alina (Cristina Flutur), who has been living in Germany.

They grew up together at an orphanage where the strong-willed Alina functioned as Voichita’s protector. Clearly they were in love. They may have had a physical relationship, though the film leaves the point uncertain. Alina has come to take her gentler friend away — there’s talk of work on a cruise ship.

Voichita still cherishes Alina but she loves God sincerely and deeply and has found a home in the monastery, which grieves the clearly troubled Alina and brings out the worst in her. She becomes a disruptive force in this tiny, rule-bound community, given to occasionally violent outbursts demonstrating her rage against those she sees as having, in a sense, seduced her beloved.

When Alina has a major breakdown, an exorcism is begun, which the film details, along with its disastrous results.

Writer-director Cristian Mungiu (who made the very fine “4 Months, 3 Weeks and 2 Days”) based this film on real-life events, but he isn’t interested in sensationalism or melodrama. Although Alina is a disturbed individual, the filmmaker deeply sympathizes with her need for love.