“The Night Of” (9 p.m. Sundays on HBO) has been one of the summer’s most compelling dramas. Co-written by acclaimed crime novelist (and “Wire” contributor) Richard Price, this eight-part series follows Nasir “Naz” Khan, an earnest college student and son of Pakistani immigrants, who’s charged with stabbing a woman he’d just met and made love to. He’s the logical suspect ­— he fled her home, leaving her in a bed of blood. And he had a knife in his pocket. Yet he insists he blacked out after their tryst and awoke to find her dead. When Pakistani-British actor Riz Ahmed stares at you with those soulful eyes, you want to believe him.

Rather than pile on absurd plot twists as TV crime shows often do, “The Night Of” lingers on the mundane nature of police work and legal work — and on the itchy feet of Naz’s bottom-feeder attorney, John Stone (given an aura of haunted weariness by actor John Turturro). An eczema sufferer, Stone scratches with chopsticks and tries unhelpful remedies, both homespun (Crisco) and medicinal (steroids). He is trapped by his marginal life as a lawyer (slogan: “No fee till you’re free”) and by his tortured feet. In fact, pretty much everyone on the show is stuck in a box — which happens to be the last name of the detective who may nail (or perhaps exonerate) Naz.

The viewer is trapped, too, by the unbearable suspense.

Then came last night’s airing, which took a few odd turns. A storyline about Stone’s impotence (triggered by steroids and counteracted by Viagra) seemed pointless. His pursuit of a suspect through a dark alley was ridiculously reckless. And heretofore gentle Naz unleashed startling rage.

But the show still has a wonderful eye for offbeat details. In one scene, a middle-aged prosecutor, played with heartfelt ennui by Jeannie Berlin, stares down a hostile witness she’s interviewing. “Why don’t you go?” she says in a deadpan voice. “And take a cookie” — from a pile on her desk.

I hope the final three episodes make it worthwhile to have spent summer Sunday nights pondering the fate of Naz. If not, I want a cookie, too.

More of Marc’s TV musings: