ABC’s old series of Afterschool Specials usually gets brickbats, and most of them deserve the barrage; but occasionally there was a pretty good episode. George Tillman, Jr.’s adaptation of Angie Thomas’ 2017 YA novel definitely has a whiff of the afterschool special to it, but though not without faults it embraces a welcome degree of complexity in conveying a timely message.

The plot—as in the recent “Blindspotting”—revolves around the killing of a young unarmed black man by a cop, but the focus of the story is on Starr Carter (Amandla Stenberg), the high school student who was in the car with the dead boy at the time and who will testify about the incident. Starr’s family lives in Garden Heights, a blighted area of the city pretty much controlled by drug lord King (Anthony Mackie) and his army of thugs. Her father Maverick (Russell Hornsby) is a ex-con who once worked for King, but has turned over a new leaf and runs a neighborhood grocery, and her mother Lisa (Regina Hall) hovers over her, her younger brother Sekani (TJ Wright) and her older half-brother Seven (Lamar Johnson), whose mother Iesha (Karan Kendrick) now lives with King.

Lisa’s desire to protect her children has led her to enroll them in Williamson, a well-financed school in the predominantly white, safe area of town. As Starr explains in voiceover (which, in fact, is rather overused), the result is that she lives a bifurcated life. In Garden Heights, she uses street slang with her friends and learns from her father how she must act in dealing with police, along with the Black Panther code. At school she sheds her black persona as much as possible, avoiding the slang of Garden Heights even as it’s employed by white kids to sound cool—kids like her best friend, blonde basketball star Kayleigh (Sabrina Carpenter) and Starr’s handsome boyfriend Chris (KJ Apa, abandoning his red hair dye from “Riverdale”), who can’t understand why she’ll never let him pick her up at home.

What changes everything is when she attends a Garden Heights party with her pal (and Seven’s half-sister) Kendra (Dominique Fishback) and bumps into Khalil (Algee Smith, looking rather like Will Smith in his “Fresh Prince” days), one of her best childhood friends (the third member of the trio, who used to play “Harry Potter” sketches together, was killed in a drive-by shooting). Khalil is selling drugs for King, but only because of family needs: the grandmother who raised him has cancer). When a fight breaks out at the party, Starr jumps into his car with Khalil and they go off—only to be stopped by a nervous white cop. He shoots Khalil, thinking the kid has a gun when it’s only his hairbrush. Naturally his death becomes a local, and then a national, news story.

Starr, of course, is caught in the middle. King issues a veiled threat to her not to say anything to the police, which enrages her protective father. An activist lawyer (Issa Rae) urges her to come forward and not only testify before the grand jury but do a national television interview. Her uncle Carlos (Common), a cop himself, tries to explain to her the anxiety a policeman faces when making a traffic stop, though in the end he can’t justify what happened. And at school her friends look upon things in different ways, some unable to comprehend her attitude and others doing their best to be supportive.

The film, and Stenberg, do a good job of dramatizing Starr’s plight, torn as she is between a desire to get justice for Khalil and the need to keep herself and her family out of danger. It does so, of course, against the backdrop of yet another police shooting of an unarmed black man, with all the issues that naturally raises in contemporary American society. Admittedly Tillman’s treatment at times seems a bit stiff dramatically, and the last act—which involves not only a violent street standoff between police and protestors but an assault by King against Starr and Seven—gets somewhat melodramatic, while lacking the scale the events should have (a consequence, no doubt, of budgetary limitations).

One can also criticize an ending that opens itself to charges of being Pollyanna-ish. A tense moment that encapsulates Thomas’ point that, as Rogers and Hammerstein once pointed out, prejudice has to be taught is comfortably defused, and a community reawakening comes off as terribly easy.

Still, the picture makes its points in a less simplistic way than one might have feared, and it is certainly bolstered by strong performances. Stenberg, whose previous appearances have not been impressive (often due to the weakness of the vehicles), is much better here, though her voiceover could well have lessened to good effect. Hall delivers her customary strong work, and Hornsby is a rock as Maverick, pulling off even the cutesy scene where he finally meets Chris face-to-face on prom night and doesn’t know what to make of him; while Common delivers a straightforward, unfussy turn as a man stifling the obvious discomfort he feels with the demands of his job in a difficult circumstance. The younger actors—Apa, Johnson, Smith, Fishback, Wright—are mostly excellent, with only Carpenter giving in somewhat to exaggeration. Even Mackie, an excellent actor, can’t give King much shading, but he’s certainly scary enough.

On the technical side things are more than adequate—William Arnold did the production design, Frank Fleming the costumes, Mihai Malaimare, Jr. the cinematography and Craig Hayes and Alex Blatt the editing—though they must often work on a fairly small scale.

“The Hate U Give” is more prosaic in confronting the spate of police shootings of unarmed black men than the more imaginative “Blindspotting” was, but it succeeds in conveying the pressure that reality places on society, especially a young generation struggling to overcome the prejudices of their elders.