HBO's True Detective was a pop-culture sensation when it debuted in 2014, but its sophomore outing sadly had none of the original's surreal magic. So we were pleased to discover season 3 had returned to form, mixing elements of noir and procedural drama to weave a haunting tale of fractured time and memory. It's the best installment yet in the anthology series.

(Mild spoilers below.)

Created by novelist Nic Pizzolatto, True Detective has always fostered a very literary, philosophical tone, falling very much into the "slow burn" category of prestige TV. When it works, it's brilliant. Season 1 was set in the Louisiana Bayou, as Detective Rustin "Rust" Cohle (Matthew McConaughey) and his partner Detective Martin "Marty" Hart (Woody Harrelson) tracked down a twisted serial killer with a fondness for leaving weird twig sculptures in the woods. The spooky setting and strong chemistry between the lead actors pretty much ensured its success with viewers and critics alike.

The less said about season 2 the better. Despite solid performances from leads Colin Farrell, Rachel McAdams, and Taylor Kitsch, the plot was a mess—something about a dead city manager, political corruption, and a crime boss' ill-fated rail project, all set in the fictional town of Vinci, California. Not surprisingly, the dreary, disappointing season hemorrhaged viewers. But Pizzolatto was able to take his time with the third installment in the anthology series, letting his ideas simmer into a rich, dark stew, and the result this time is far more satisfying.

Season 3 is set in the Ozarks and stars two-time Oscar-winning actor Mahershala Ali (Moonlight, Cottonmouth in season 1 of Luke Cage) as Detective Wayne Hays. Pizzolatto went to college at the University of Arkansas and hence knew firsthand how powerfully evocative the area (with its mix of period architecture and abandoned buildings) would be for his story. "I feel landscape is a character, definitely, in what I do," he told Fayetteville Flyer last year.

The storyline shifts between three different time periods. The first is set in 1980 and follows a young Hays and his partner, Arkansas State Investigator Roland West (Stephen Dorff, who memorably played Deacon Frost in 1998's Blade), as they investigate a case involving two missing children. Next is a 1990 reinvestigation of the case in which the person originally (posthumously) convicted turns out to be (probably) innocent. And lastly, we get the present day, as an elderly Hays suffers from dementia and struggles to piece together what really went down all those years ago.

This season has many of the elements that made the first installment so enjoyable: a mysterious cold case in a brooding, atmospheric setting; a community harboring lots of secrets; hints of occult symbols; conflict and violence simmering just below the surface; and a detective tormented by regret and personal demons. It also has another partnership for the ages in Hays and West, with an inevitable undercurrent of racial tension running through their complicated friendship. (During one particularly testy exchange, Hays dares his partner to call him the 'N' word: "Go ahead. Say it." West responds, "Nah. But I want you to know I'm thinking it.")

It’s Ali’s remarkable performance that anchors this season.

It's got a killer opening credits tune, and the writing is much improved from season 2. While some might miss McConaughey's drawling philosophical rumination—a highlight of that first season ("Time is a flat circle," man)—the dialogue here is crisp and tight, in keeping with Hays' more laconic personality. Frankly, it's Ali's remarkable performance that anchors this season, augmented by some very impressive work from the makeup department. So often actors made up to look older look like just that: actors made up to look older. Ali embodies Hays at every age with so much conviction, you forget he's not really an old man with dementia. (This is not to slight Dorff, who provides the perfect foil in his nuanced portrayal of West—a separate craft all its own.)

This is the second stellar television treatment of age-related dementia we've seen over the last year, the other being Sissy Spacek's performance in Castle Rock. Like Spacek's character, Ruth, the elderly Hays finds himself slipping between time periods, sometimes finding himself standing on a dark street in the middle of the night, with no recollection of how he got there. It makes for one of the most striking scenes in episode 7, superbly shot to emphasize his increasing isolation and efforts to stave off the encroaching darkness. His failing memory strains his relationships and hampers his attempt to, once and for all, solve the case that ruined his life. And it's really a challenge to do all that while trying not to reveal his own dark secret.

Because the story is told predominantly from Hays' perspective, the narrative jumps back and forth among the time periods somewhat haphazardly, in keeping with the unpredictability of his memory. But the jumps work: the viewer rarely feels unmoored in time, unlike Hays. Eventually, Hays gets his answers, but will he remember them? Perhaps that's not the point. True Detective has always been as much about the journey as the central mystery. This is a journey worth taking.