David Lowery, who brought a touch of gossamer magic, as well as an underpinning of emotional loss, to his large-scale remake of Disney’s “Pete’s Dragon,” imbues the horror genre with a rare degree of poetic elegance while ruminating on the nature of time, memory and grief in his far more technically modest follow-up, “A Ghost Story.”

One might argue that it’s misleading to associate Lowery’s film with horror movies at all, but the writer-director himself invites the categorization, since the first fifteen minutes or so might lead the viewer to expect something fairly conventional. A young couple, identified in the credits only as C and M (Casey Affleck and Rooney Mara), move into one of a small group of old track houses in a remote rustic area—he’s a songwriter apparently happy with solitude, while she expresses unhappiness at being alone all day while he goes off to work. Nonetheless they seem genuinely affectionate and happy, though one night they’re awoken by a strange sound that causes them to investigate the house for a possible break-in—without result. The stage would seem to be set for a typical haunted house tale.

That changes abruptly, however, when the man suddenly dies in a car crash (typically, we’re merely shown the aftermath, with his bleeding head lying on the steering wheel, rather than the actual accident). His wife goes to identify his body in the morgue, and after looking quietly at his face, covers it and leaves. The camera lingers on the gurney until the sheet covering the man rises and his “ghost”—simply the sheet with black eyeholes—glides through the hospital corridors past unseeing staff and patients, over the fields, and back to the house, where he watches his wife mourn.

“A Ghost Story” thus becomes a story told from the ghost’s perspective—a haunting tale in every sense of the phrase. The spirit watches M as she grieves—in one excruciatingly long take consuming most of a pie left for her by a sympathetic friend—but as time passes, she returns to a more ordinary life, even leading to C’s first little episode of poltergeist behavior when she comes home one night with a potential boyfriend (Barlow Jacobs). Eventually M decides to move on, but not before leaving behind a note that she inserts in a crack. For the rest of the film the ghost will scrape away at the wall, trying to retrieve her message. C will also make poignant contact with another ghost haunting the house across the lawn. They wave to one another, and the other spirit says that he (or she) is waiting for someone—though s/he is not quite certain who it is.

C is obviously waiting too, but his new solitude is ended when single mom Maria (Sonia Acevedo) moves in with her two children Carlos (Carlos Bermudez) and Yasmina (Yasmina Gutierrez). He watches them as they settle in, but one evening reveals himself to the boy, leading to a more violent outburst of poltergeist behavior that sends the family scurrying out of the place.

Time passes, and suddenly the house is filled with partying thirty-somethings, one of whom (Will Oldham)—in the longest stretch of dialogue in the movie—opines that all human beings strive to be remembered, a futile effort in view of the fact that the universe itself is doomed to disappear. That sets off further temporal change, in which the houses are being bulldozed for development. The ghost across the way, admitting that nobody’s coming back, ceases to be—in a simple effect that outdoes those that cost millions in other films, the sheet simply drops, empty, to the floor. C stays on, witnessing the emergence of a huge office building where his home once stood.

But then he flings himself, in a temporal twist, into the nineteenth-century past, where he watches a family of settlers perish at the hands of Indians (an event, once again, we do not witness but only hear), and then observes the body of one of them—a little girl who has scribbled a note and hidden it under a rock—decompose into the ground.

That leads back to the film’s beginning, with the ghost watching as his bodily self and M investigate the noise that woke them at the start. Time, it appears, is not just fluid but an irrelevant concept, a human attempt to understand reality that is not real itself.

All of this suggests that “A Ghost Story” is more plot-driven that it actually is. The film is a mood piece, a reverie about the human need for connection, the inevitability of change, the pain of loss and eventual resignation about how things are. Lowery, serving as his own editor, presents it with the same delicate, unforced style he has brought to his previous films, and his collaborators are one with his vision. Production designers Jade Healy and Tom Walker provide suitably simple sets, and cinematographer Andrew Droz Palermo’s camerawork (in boxy 1:33:1 frame) is unadorned but nonetheless evocative, while major credit is due to costumer Annell Brodeur, who has designed a sheet for Affleck to wear that allows him considerable expressiveness—and falls to the ground at the end with strangely heartbreaking limpness. Adding to the atmosphere is an affecting score by Daniel Hart and John Congleton.

“A Ghost Story” may not scare you—its tactics are certainly very different from those of the article-free “Ghost Story” from 1981, based on Peter Straub’s book. But Lowery’s mournful, strangely moving film is likely to haunt you.